X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=lib%2Fas3%2Ftokenizer.lex;h=8bf8c89f06dba379b34a7f3bd5b3886dfe31e3aa;hb=f68c14446f6fcd6ecaf36392cd943f32ff7e22cd;hp=5a8ec323fb14c1d01180ef8adb6755b6f63e95ca;hpb=2f5439b70a9b86a51b629efe0c9ae7f4bda00107;p=swftools.git diff --git a/lib/as3/tokenizer.lex b/lib/as3/tokenizer.lex index 5a8ec32..8bf8c89 100644 --- a/lib/as3/tokenizer.lex +++ b/lib/as3/tokenizer.lex @@ -147,8 +147,14 @@ static inline int handlenumber() } } if(yytext[0]=='-') { - avm2_lval.number_int = atoi(s); - return T_INT; + int v = atoi(s); + avm2_lval.number_int = v; + if(v>-128) + return T_BYTE; + else if(v>=-32768) + return T_SHORT; + else + return T_INT; } else { unsigned int v = 0; for(t=0;t