I've noticed lately that I've been getting coruption when adding key input events. I'm using the tried and true method I've used for years without problems. That is the combo of CX and AmigaLib.
So what I'm doing is building up a string from other strings, converting it to input events and sending them out. Namely, functions like cx_lib/InvertStringRev(), which would call on InvertKeyMap(), then send it out using AddIEvents().
I've noticed the problem when the string has a new line. Ideally I want to send newlines as well. But I have noticed that newlines inside a string don't cause a newline in the output and all the text gets bunched together. And a newline on the end tends to corrupt the end of the string somehow. It's strange.
I ran my code in a debugger and it acted fine. The string I bullt looks fine to me! But gets corrupted when printed to screen. Odyssey text editor, NotePad, Shell and even FileX all show corruption.
I wondered if all the newlines needed to be converted to "\n". But upon checking InvertStringRev() it converts that to a byte code anyway. However, strings only have one 10 for LF, and the Amiga tends to use 13, 10. But I've never seen it cause corruption before. :-?
Has anyone else encountered this?