error method *always* gets a string (otherwise it is not called at all)

This commit is contained in:
Roberto Ierusalimschy 1997-12-23 10:50:49 -02:00
parent 03f3f9e707
commit 807ba6301c
1 changed files with 2 additions and 4 deletions

6
ldo.c
View File

@ -1,5 +1,5 @@
/* /*
** $Id: ldo.c,v 1.17 1997/12/18 18:32:39 roberto Exp roberto $ ** $Id: ldo.c,v 1.18 1997/12/22 20:57:18 roberto Exp roberto $
** Stack and Call structure of Lua ** Stack and Call structure of Lua
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -38,9 +38,7 @@
static void stderrorim (void) static void stderrorim (void)
{ {
lua_Object s = lua_getparam(1); fprintf(stderr, "lua error: %s\n", lua_getstring(lua_getparam(1)));
if (lua_isstring(s))
fprintf(stderr, "lua error: %s\n", lua_getstring(s));
} }