lol, I think I found a really funny solution with your help Malice, doing this after having copied content of current textbox string and before doing inkey(...):

Code:
str_cat(input_str, str_flush_buffer); //add spaces
str_trunc(input_str, 1); //removes point of memory error



I am not sure if this is bulletproof though. I mean in the world of memory errors it would be best to not use it blindly. So far after some testing it seems good though.