Closed TarCV closed 4 years ago
name is a member of Variable, and the data is obtained through findVariable, which appears to be where the issue resides: https://github.com/TarCV/botc/blob/99dbd44f9aa5d9d0469d9b190450a91fe5576a04/src/parser.cpp#L1285 https://github.com/TarCV/botc/blob/99dbd44f9aa5d9d0469d9b190450a91fe5576a04/src/parser.cpp#L1435
https://github.com/TarCV/botc/blob/99dbd44f9aa5d9d0469d9b190450a91fe5576a04/src/parser.cpp#L1288
To fix this, change that to: error ("unknown variable $%1", getTokenString());
Thank you. Could you check that #8 works? My C++ build environment is broken currently, so I'll not be able to check it for some time.
I posted a comment there, but answering here as well: it does work.
https://github.com/TarCV/botc/blob/99dbd44f9aa5d9d0469d9b190450a91fe5576a04/src/parser.cpp#L1288 https://github.com/TarCV/botc/blob/99dbd44f9aa5d9d0469d9b190450a91fe5576a04/src/format.h#L258 Issue is likely caused by a missing null terminator in var->name.