blob: ae179d887d2181146e52f7557dad57ff5b596f35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
commit 7e06e56157e8431d02e1377cdc44230944203d88
Author: Alexey Gladkov <gladkov.alexey@gmail.com>
Date: Tue Dec 11 14:24:44 2012 +0400
Fix regression in 16117ce6ab
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
diff --git a/src/loadkeys.analyze.l b/src/loadkeys.analyze.l
index c18dcea..f817c78 100644
--- a/src/loadkeys.analyze.l
+++ b/src/loadkeys.analyze.l
@@ -307,8 +307,10 @@ To to|To|TO
char *s = xstrndup(yytext+1, strlen(yytext)-2);
/* use static pathname to store *s ? */
open_include(s);
- yy_pop_state();
- state_ptr--;
+ while (state_ptr > 0) {
+ yy_pop_state();
+ state_ptr--;
+ }
}
<INCLSTR>[^"]|\"\"|\"[^"\n]*{Eol} {
yyerror(_("expected filename between quotes"));
@@ -323,7 +325,7 @@ To to|To|TO
}
{Eol} {
line_nr++;
- if (state_ptr > 0) {
+ while (state_ptr > 0) {
yy_pop_state();
state_ptr--;
}
@@ -428,8 +430,10 @@ To to|To|TO
}
<STR>\" {
*p = '\0';
- yy_pop_state();
- state_ptr--;
+ while (state_ptr > 0) {
+ yy_pop_state();
+ state_ptr--;
+ }
return(STRLITERAL);
}
. {
|