From 4dff277255e3785b76b6b52fe2a98592e6cbc834 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 7 Jul 2017 13:34:32 -0300 Subject: coercion string->number in arithmetic operations moved to string library --- lobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lobject.c') diff --git a/lobject.c b/lobject.c index 9ad833c9..21616fad 100644 --- a/lobject.c +++ b/lobject.c @@ -1,5 +1,5 @@ /* -** $Id: lobject.c,v 2.115 2017/05/24 13:47:11 roberto Exp roberto $ +** $Id: lobject.c,v 2.116 2017/06/29 15:06:44 roberto Exp roberto $ ** Some generic functions over Lua objects ** See Copyright Notice in lua.h */ @@ -147,7 +147,7 @@ int luaO_rawarith (lua_State *L, int op, const TValue *p1, const TValue *p2, setivalue(res, intarith(L, op, ivalue(p1), ivalue(p2))); return 1; } - else if (tonumber(p1, &n1) && tonumber(p2, &n2)) { + else if (tonumberns(p1, n1) && tonumberns(p2, n2)) { setfltvalue(res, numarith(L, op, n1, n2)); return 1; } -- cgit v1.2.3-55-g6feb