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 --- ldebug.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index ac0b7d54..b83b2f89 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.127 2017/06/27 11:35:31 roberto Exp roberto $ +** $Id: ldebug.c,v 2.128 2017/06/29 15:06:44 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -679,8 +679,7 @@ l_noret luaG_concaterror (lua_State *L, const TValue *p1, const TValue *p2) { l_noret luaG_opinterror (lua_State *L, const TValue *p1, const TValue *p2, const char *msg) { - lua_Number temp; - if (!tonumber(p1, &temp)) /* first operand is wrong? */ + if (!ttisnumber(p1)) /* first operand is wrong? */ p2 = p1; /* now second is wrong */ luaG_typeerror(L, p2, msg); } -- cgit v1.2.3-55-g6feb