I’ve just found a bug in OS_GSTrans, anyone got Acorn’s address?
nemo (145) 2529 posts |
I was trying to do something hard with OS_ReadArgs (which is rarely possible), and then realised I could do something clever with GSInit/GSRead… which prompted me to check GSTrans. Aaaaaand it gets it wrong. Ha! It’s a bug in the code, but being as established as it clearly is, one has to instead point the finger at the documentation. Bad documentation! No! GSTrans claims to translate “a string”, but fails to fully define what “a” means, and so forgets that the input will often mean something wrapped in quotes, However, the input string may be longer than that, So what would you expect to see in your buffer and in particular, what would you expect the terminator byte to be? You may guess 0. You might like to think it would be whatever the terminator of the input string is. But it’s actually Anyway. Made me laugh. |