diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-09-06 17:34:18 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-09-06 17:34:18 -0300 |
commit | 2e13cd77ab3b3719ef139e4786328be813fb10e0 (patch) | |
tree | 17717c1015f20dff2ac62cfd2a082c4aba5ab206 /llex.c | |
parent | ff9c0da7839543478d62306dd208f11caab130c1 (diff) | |
download | lua-2e13cd77ab3b3719ef139e4786328be813fb10e0.tar.gz lua-2e13cd77ab3b3719ef139e4786328be813fb10e0.tar.bz2 lua-2e13cd77ab3b3719ef139e4786328be813fb10e0.zip |
new interface for `luaO_strtod', which now checks signal, too.
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 1.37 1999/07/22 19:29:42 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 1.38 1999/08/16 20:52:00 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 | */ |
@@ -402,8 +402,7 @@ int luaX_lex (LexState *LS) { | |||
402 | save_and_next(LS); | 402 | save_and_next(LS); |
403 | } | 403 | } |
404 | save('\0'); | 404 | save('\0'); |
405 | LS->seminfo.r = luaO_str2d(L->Mbuffer+L->Mbuffbase); | 405 | if (!luaO_str2d(L->Mbuffer+L->Mbuffbase, &LS->seminfo.r)) |
406 | if (LS->seminfo.r < 0) | ||
407 | luaX_error(LS, "invalid numeric format"); | 406 | luaX_error(LS, "invalid numeric format"); |
408 | return NUMBER; | 407 | return NUMBER; |
409 | 408 | ||