InputText: fix buffer modifications in callbacks while using resize callback (#4784)

Regressed by 5ac25e7c7 (#4762)
1 file changed