libregexp: fix lexer so it doesnt move past the string when it gets a \ escape
This commit is contained in:
parent
6e65596827
commit
b4c1cf2ea1
1 changed files with 2 additions and 6 deletions
|
@ -312,13 +312,10 @@ getnextr(Parselex *l)
|
|||
return;
|
||||
}
|
||||
l->rawexp += chartorune(&l->rune, l->rawexp);
|
||||
if(l->rune == L'\\') {
|
||||
l->rawexp += chartorune(&l->rune, l->rawexp);
|
||||
l->literal = 1;
|
||||
}
|
||||
if(*l->rawexp == 0)
|
||||
l->done = 1;
|
||||
return;
|
||||
if(l->rune == L'\\')
|
||||
getnextrlit(l);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -333,7 +330,6 @@ getnextrlit(Parselex *l)
|
|||
l->rawexp += chartorune(&l->rune, l->rawexp);
|
||||
if(*l->rawexp == 0)
|
||||
l->done = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in a new issue