From 807ba6301c949cb42bd9390d737938c51dd5784c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 23 Dec 1997 10:50:49 -0200 Subject: [PATCH] error method *always* gets a string (otherwise it is not called at all) --- ldo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ldo.c b/ldo.c index 88261e50..2c689fdc 100644 --- a/ldo.c +++ b/ldo.c @@ -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 ** See Copyright Notice in lua.h */ @@ -38,9 +38,7 @@ static void stderrorim (void) { - lua_Object s = lua_getparam(1); - if (lua_isstring(s)) - fprintf(stderr, "lua error: %s\n", lua_getstring(s)); + fprintf(stderr, "lua error: %s\n", lua_getstring(lua_getparam(1))); }