lex_get_line(), the main caller of lex_get_line_raw(), set lexer->prog to
NULL when reading failed, but other callers need to do the same thing too,
otherwise e.g. DO REPEAT accesses invalid storage when there is a missing
END REPEAT.
Bug #31016.
const char *line = ds_cstr (&lexer->line_buffer);
text_item_submit (text_item_create (TEXT_ITEM_SYNTAX, line));
}
+ else
+ lexer->prog = NULL;
return ok;
}
bool line_starts_command;
if (!lex_get_line_raw (lexer))
- {
- lexer->prog = NULL;
- return false;
- }
+ return false;
lex_preprocess_line (&lexer->line_buffer,
lex_current_syntax_mode (lexer),