2009-06-17 Vladimir Serbinenko <phcoder@gmail.com>
Fix newline handling * include/grub/script_sh.h (grub_lexer_param): new field was_newline * script/sh/lexer.c (grub_script_lexer_init): initilaise was_newline (grub_script_yylex): don't segfault on unterminated script newline terminates command and variable
This commit is contained in:
parent
74aa8e4bf8
commit
cf24ed9e2a
3 changed files with 29 additions and 10 deletions
|
@ -159,6 +159,9 @@ struct grub_lexer_param
|
|||
|
||||
/* The token that is already parsed but not yet returned. */
|
||||
int tokenonhold;
|
||||
|
||||
/* Was the last token a newline? */
|
||||
int was_newline;
|
||||
};
|
||||
|
||||
/* State of the parser as passes to the parser. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue