[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[2324] 2009-06-15 Vladimir Serbinenko <address@hidden>
From: |
Vladimir Serbinenko |
Subject: |
[2324] 2009-06-15 Vladimir Serbinenko <address@hidden> |
Date: |
Mon, 15 Jun 2009 21:04:17 +0000 |
Revision: 2324
http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2324
Author: phcoder
Date: 2009-06-15 21:04:17 +0000 (Mon, 15 Jun 2009)
Log Message:
-----------
2009-06-15 Vladimir Serbinenko <address@hidden>
Fix handling of string like \"hello\" and "a
b"
* script/sh/lexer.c
(grub_script_yylex): fix parsing of quoting, escaping and newline
Modified Paths:
--------------
trunk/grub2/script/sh/lexer.c
Modified: trunk/grub2/script/sh/lexer.c
===================================================================
--- trunk/grub2/script/sh/lexer.c 2009-06-15 20:59:55 UTC (rev 2323)
+++ trunk/grub2/script/sh/lexer.c 2009-06-15 21:04:17 UTC (rev 2324)
@@ -156,18 +156,20 @@
return token;
}
- for (;! state->done && (*state->script || firstrun); firstrun = 0)
+ for (;! state->done; firstrun = 0)
{
if (! *state->script)
{
/* Check if more tokens are requested by the parser. */
if (((state->refs && ! parsestate->err)
- || state->state == GRUB_PARSER_STATE_ESC)
+ || state->state == GRUB_PARSER_STATE_ESC
+ || state->state == GRUB_PARSER_STATE_QUOTE
+ || state->state == GRUB_PARSER_STATE_DQUOTE)
&& state->getline)
{
int doexit = 0;
- while (!state->script || ! grub_strlen (state->script))
+ while (!state->script || ! *state->script)
{
grub_free (state->newscript);
state->newscript = 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [2324] 2009-06-15 Vladimir Serbinenko <address@hidden>,
Vladimir Serbinenko <=