From c549d4fe64c48ab645740e6d12c69c91250fad3d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 1 May 2014 15:18:06 -0300 Subject: 'lua_strtonum' (and 'luaO_str2num') now return string size, instead of receiving it --- llex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llex.c') diff --git a/llex.c b/llex.c index ff3c3781..328a4833 100644 --- a/llex.c +++ b/llex.c @@ -1,5 +1,5 @@ /* -** $Id: llex.c,v 2.74 2014/02/14 15:23:51 roberto Exp roberto $ +** $Id: llex.c,v 2.75 2014/04/30 16:48:44 roberto Exp roberto $ ** Lexical Analyzer ** See Copyright Notice in lua.h */ @@ -210,7 +210,7 @@ static void buffreplace (LexState *ls, char from, char to) { #endif -#define buff2num(b,o) luaO_str2num(luaZ_buffer(b), luaZ_bufflen(b) - 1, o) +#define buff2num(b,o) (luaO_str2num(luaZ_buffer(b), o) != 0) /* ** in case of format error, try to change decimal point separator to -- cgit v1.2.3-55-g6feb