From fc8d077612a235b42d5defd48d6ba923ed85a17f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 29 May 2007 15:59:59 -0300 Subject: bug: wrong error message in some concatenations --- ldebug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index 240f5277..e76da28c 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.35 2007/03/26 18:35:34 roberto Exp roberto $ +** $Id: ldebug.c,v 2.36 2007/05/09 15:49:36 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -591,8 +591,8 @@ void luaG_typeerror (lua_State *L, const TValue *o, const char *op) { void luaG_concaterror (lua_State *L, StkId p1, StkId p2) { - if (ttisstring(p1)) p1 = p2; - lua_assert(!ttisstring(p1)); + if (ttisstring(p1) || ttisnumber(p1)) p1 = p2; + lua_assert(!ttisstring(p1) && !ttisnumber(p2)); luaG_typeerror(L, p1, "concatenate"); } -- cgit v1.2.3-55-g6feb