From 5f2d187b7385480b5893f7caa2efbf98f76f8578 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 9 Nov 1994 16:11:47 -0200 Subject: frees file names when unstacked --- table.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'table.c') diff --git a/table.c b/table.c index 2ee29847..374fb316 100644 --- a/table.c +++ b/table.c @@ -3,7 +3,7 @@ ** Module to control static tables */ -char *rcs_table="$Id: table.c,v 2.12 1994/11/07 16:34:44 roberto Exp roberto $"; +char *rcs_table="$Id: table.c,v 2.13 1994/11/08 20:07:54 roberto Exp $"; #include #include @@ -235,7 +235,7 @@ char *lua_createstring (char *s) */ char *lua_addfile (char *fn) { - if (lua_nfile >= MAXFILE-1) + if (lua_nfile >= MAXFILE) return "too many files"; if ((lua_file[lua_nfile++] = strdup (fn)) == NULL) return "not enough memory"; @@ -247,7 +247,7 @@ char *lua_addfile (char *fn) */ int lua_delfile (void) { - free(lua_file[lua_nfile--]); + free(lua_file[--lua_nfile]); return 1; } -- cgit v1.2.3-55-g6feb