Fix a couple of sign-extension bugs.
Submitted by: serg@bcs1.bcs.zaporizhzhe.ua (Sergey Shkonda)
This commit is contained in:
parent
0bb6d12402
commit
e34654d225
@ -67,7 +67,7 @@ next(s)
|
||||
case INFINITE:
|
||||
return (1);
|
||||
case NORMAL:
|
||||
switch (ch = *s->str) {
|
||||
switch (ch = (u_char)*s->str) {
|
||||
case '\0':
|
||||
s->state = EOS;
|
||||
return (0);
|
||||
@ -241,7 +241,7 @@ genrange(s)
|
||||
char *savestart;
|
||||
|
||||
savestart = s->str;
|
||||
stopval = *++s->str == '\\' ? backslash(s) : *s->str++;
|
||||
stopval = *++s->str == '\\' ? backslash(s) : (u_char)*s->str++;
|
||||
if (stopval < (u_char)s->lastch) {
|
||||
s->str = savestart;
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user