30.08.2015, 15:11
AlfaRomeo schrieb:maybe because, in my code it still accept the introduction of some few letters
Yeah, what's happening is that MUI is looking at a "string" in the address pointed to by your string, which is really a temporary buffer - effectively it will be random bytes, so by chance there are some bytes that are allowed. You might find that the accepted characters change over time, depending on what else your program does. I had the same problem with some old code of mine that worked fine with earlier versions of the compiler, but the characters it did allow were different to yours.
The reason MUISet accepts a string without giving an error is that it doesn't know what the object you're setting is going to use the parameter for. Giving a string makes it pass a pointer to a temporary string buffer, some objects might make a copy of that string which is fine, but others just access it directly which is only ok until the buffer is used for something else, then it causes all sorts of strange problems.
The GetGlobalStrAddr() function actually exists in the older versions as Null(), but you shouldn't use that as it has been replaced by the Null keyword in the later versions, and your code won't compile when you upgrade AmiBlitz. So you're probably right to use Der Wanderer's solution for now.