Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent crash on encountering undefined variable #2

Closed
TarCV opened this issue Feb 3, 2019 · 5 comments · Fixed by #8
Closed

Silent crash on encountering undefined variable #2

TarCV opened this issue Feb 3, 2019 · 5 comments · Fixed by #8
Labels
good first issue Good for newcomers

Comments

@TarCV
Copy link
Owner

TarCV commented Feb 3, 2019

No description provided.

@TarCV TarCV added the good first issue Good for newcomers label Feb 3, 2019
@ghost
Copy link

ghost commented Mar 29, 2020

error ("unknown variable $%1", var->name);

void error (const char* fmtstr, const argtypes&... args)

Issue is likely caused by a missing null terminator in var->name.

@ghost
Copy link

ghost commented Mar 29, 2020

name is a member of Variable, and the data is obtained through findVariable, which appears to be where the issue resides:

Variable* var = findVariable (getTokenString());

Variable* BotscriptParser::findVariable (const String& name)

@ghost
Copy link

ghost commented Apr 15, 2020

error ("unknown variable $%1", var->name);

To fix this, change that to:
error ("unknown variable $%1", getTokenString());

@TarCV
Copy link
Owner Author

TarCV commented Apr 16, 2020

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.

@ghost
Copy link

ghost commented Apr 16, 2020

I posted a comment there, but answering here as well: it does work.

@TarCV TarCV closed this as completed in #8 Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant