Skip to content
Permalink
Browse files
Fixed crash in lexer on empty input stream.
  • Loading branch information
icculus committed Feb 24, 2009
1 parent 915a7cd commit d09bcaa0514b1e419edb4f7d1993156089bea93a
Showing with 11 additions and 2 deletions.
  1. +5 −1 mojoshader_lexer.c
  2. +6 −1 mojoshader_lexer.re
@@ -1245,7 +1245,11 @@ Token preprocessor_lexer(IncludeState *s)
}
}
yy206:
{ cursor=(const uchar*)s->source; goto scanner_loop; }
{
token = cursor = (const uchar *) s->source;
limit = cursor + s->bytes_left;
goto scanner_loop;
}
yy207:
++YYCURSOR;
yych = *YYCURSOR;
@@ -212,7 +212,12 @@ ppdirective:
PP "endif" { RET(TOKEN_PP_ENDIF); }
PP "error" { RET(TOKEN_PP_ERROR); }
WHITESPACE { goto ppdirective; }
ANY { cursor=(const uchar*)s->source; goto scanner_loop; }
ANY {
token = cursor = (const uchar *) s->source;
limit = cursor + s->bytes_left;
goto scanner_loop;
}
*/

bad_chars:

0 comments on commit d09bcaa

Please sign in to comment.