commit 6153200bc25bd99f9d3d25d7caa486b03b6535d5
parent 2e7595522db676e77ee057f091dcc10a0f3d885f
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 19 Nov 1997 16:16:12 -0200
make sure there is no mem problems, using %.ns instead of %s for luaV_error.
Diffstat:
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lapi.c b/lapi.c
@@ -1,5 +1,5 @@
/*
-** $Id: lapi.c,v 1.4 1997/11/04 15:27:53 roberto Exp roberto $
+** $Id: lapi.c,v 1.5 1997/11/19 17:29:23 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@@ -389,7 +389,7 @@ void lua_settag (int tag)
(L->stack.top-1)->value.ts->u.d.tag = tag;
break;
default:
- luaL_verror("cannot change the tag of a %s",
+ luaL_verror("cannot change the tag of a %.20s",
luaO_typenames[-ttype((L->stack.top-1))]);
}
L->stack.top--;
diff --git a/liolib.c b/liolib.c
@@ -1,5 +1,5 @@
/*
-** $Id: liolib.c,v 1.4 1997/11/04 15:27:53 roberto Exp roberto $
+** $Id: liolib.c,v 1.5 1997/11/19 17:29:23 roberto Exp roberto $
** Standard I/O (and system) library
** See Copyright Notice in lua.h
*/
@@ -83,7 +83,7 @@ static FILE *getfile (char *name)
{
lua_Object f = lua_getglobal(name);
if (!ishandler(f))
- luaL_verror("global variable %s is not a file handle", name);
+ luaL_verror("global variable %.50s is not a file handle", name);
return lua_getuserdata(f);
}
diff --git a/lmathlib.c b/lmathlib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lmathlib.c,v 1.3 1997/11/03 21:11:44 roberto Exp roberto $
+** $Id: lmathlib.c,v 1.4 1997/11/04 15:27:53 roberto Exp roberto $
** Lua standard mathematical library
** See Copyright Notice in lua.h
*/
@@ -30,7 +30,7 @@ static double torad (void)
case 'r' : return 1.0;
case 'g' : return PI/50.0;
default:
- luaL_verror("invalid _TRIGMODE (`%s')", s);
+ luaL_verror("invalid _TRIGMODE (`%.50s')", s);
return 0; /* to avoid warnings */
}
}
diff --git a/ltm.c b/ltm.c
@@ -1,5 +1,5 @@
/*
-** $Id: ltm.c,v 1.7 1997/11/10 17:47:01 roberto Exp roberto $
+** $Id: ltm.c,v 1.8 1997/11/19 17:29:23 roberto Exp roberto $
** Tag methods
** See Copyright Notice in lua.h
*/
@@ -131,7 +131,7 @@ void luaT_settagmethod (int t, char *event, TObject *func)
int e = luaI_checkevent(event, luaT_eventname);
checktag(t);
if (!validevent(t, e))
- luaL_verror("settagmethod: cannot change internal method `%s' for tag %d",
+ luaL_verror("settagmethod: cannot change internal method `%.20s' for tag %d",
luaT_eventname[e], t);
*func = *luaT_getim(t,e);
*luaT_getim(t, e) = temp;