coercion string->number in arithmetic operations moved to string
library
This commit is contained in:
5
ldebug.c
5
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user