Fix an NPE related to an array descriptor just before an EOF

This commit is contained in:
Ben Gruver 2015-05-05 20:40:02 -07:00
parent 7061b7871d
commit 46b359cf21
2 changed files with 2 additions and 0 deletions

View File

@ -631,6 +631,7 @@ Type = {PrimitiveType} | {ClassDescriptor} | {ArrayPrefix} ({ClassDescriptor} |
{PrimitiveType} { yybegin(YYINITIAL); return newToken(PRIMITIVE_TYPE); }
{ClassDescriptor} { yybegin(YYINITIAL); return newToken(CLASS_DESCRIPTOR); }
[^] { yypushback(1); yybegin(YYINITIAL); }
<<EOF>> { yybegin(YYINITIAL); }
}
/*Types*/

View File

@ -126,5 +126,6 @@ public class SmaliLexer extends LexerBase {
token = (CommonToken)lexer.nextToken();
state = lexer.yystate();
}
assert token != null;
}
}