aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-12-23 10:50:49 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1997-12-23 10:50:49 -0200
commit807ba6301c949cb42bd9390d737938c51dd5784c (patch)
tree1878a80d6d84741e5dd162f76b2232152e4dd225
parent03f3f9e707ceaf46efb4917f8d32ea62283b9358 (diff)
downloadlua-807ba6301c949cb42bd9390d737938c51dd5784c.tar.gz
lua-807ba6301c949cb42bd9390d737938c51dd5784c.tar.bz2
lua-807ba6301c949cb42bd9390d737938c51dd5784c.zip
error method *always* gets a string (otherwise it is not called at all)
-rw-r--r--ldo.c6
1 files 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 @@
1/* 1/*
2** $Id: ldo.c,v 1.17 1997/12/18 18:32:39 roberto Exp roberto $ 2** $Id: ldo.c,v 1.18 1997/12/22 20:57:18 roberto Exp roberto $
3** Stack and Call structure of Lua 3** Stack and Call structure of Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -38,9 +38,7 @@
38 38
39static void stderrorim (void) 39static void stderrorim (void)
40{ 40{
41 lua_Object s = lua_getparam(1); 41 fprintf(stderr, "lua error: %s\n", lua_getstring(lua_getparam(1)));
42 if (lua_isstring(s))
43 fprintf(stderr, "lua error: %s\n", lua_getstring(s));
44} 42}
45 43
46 44