mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-05 18:15:30 +00:00
Preset parser: Return 0.0 constant on empty rvalue if line is terminated properly.
Crashed on presets with expression lines like "val = ;".
This commit is contained in:
@ -854,7 +854,7 @@ Expr * Parser::_parse_gen_expr ( std::istream & fs, TreeExpr * tree_expr, Milkd
|
||||
if (*string == 0)
|
||||
{
|
||||
if (PARSE_DEBUG) printf("parse_gen_expr: empty string coupled with terminal (LINE %d) \n", line_count);
|
||||
if (nullptr == tree_expr && (token==tEOF||token==tEOL))
|
||||
if (nullptr == tree_expr && (token == tEOF || token == tEOL || token == tSemiColon))
|
||||
{
|
||||
// we will get here if we have a completely empty line e.g. "shape_1_per_frame1=shpt ="
|
||||
// we return 0 because returning NULL would indicate an error
|
||||
|
||||
Reference in New Issue
Block a user