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:
phcoder committed 2009-06-17 13:47:37 +00:00
1 parent 74aa8e4bf8
commit cf24ed9e2a
3 files changed
+29 -10

No files matched your search

+3
View File
@@ -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. */