diff options
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 2.64 2013/04/16 18:46:28 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 2.65 2013/04/26 13:07:53 roberto Exp roberto $ |
3 | ** Lexical Analyzer | 3 | ** Lexical Analyzer |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -248,7 +248,8 @@ static int read_numeral (LexState *ls, SemInfo *seminfo, int isf) { | |||
248 | } | 248 | } |
249 | save(ls, '\0'); | 249 | save(ls, '\0'); |
250 | if (!isf) { | 250 | if (!isf) { |
251 | if (!luaO_str2int(luaZ_buffer(ls->buff), &seminfo->i)) | 251 | if (!luaO_str2int(luaZ_buffer(ls->buff), luaZ_bufflen(ls->buff) - 1, |
252 | &seminfo->i)) | ||
252 | lexerror(ls, "malformed number", TK_INT); | 253 | lexerror(ls, "malformed number", TK_INT); |
253 | return TK_INT; | 254 | return TK_INT; |
254 | } | 255 | } |