From 2e13cd77ab3b3719ef139e4786328be813fb10e0 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 6 Sep 1999 17:34:18 -0300 Subject: new interface for `luaO_strtod', which now checks signal, too. --- llex.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llex.c') diff --git a/llex.c b/llex.c index 63404c3d..09891b61 100644 --- a/llex.c +++ b/llex.c @@ -1,5 +1,5 @@ /* -** $Id: llex.c,v 1.37 1999/07/22 19:29:42 roberto Exp roberto $ +** $Id: llex.c,v 1.38 1999/08/16 20:52:00 roberto Exp roberto $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ @@ -402,8 +402,7 @@ int luaX_lex (LexState *LS) { save_and_next(LS); } save('\0'); - LS->seminfo.r = luaO_str2d(L->Mbuffer+L->Mbuffbase); - if (LS->seminfo.r < 0) + if (!luaO_str2d(L->Mbuffer+L->Mbuffbase, &LS->seminfo.r)) luaX_error(LS, "invalid numeric format"); return NUMBER; -- cgit v1.2.3-55-g6feb