diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.234 2017/12/07 18:51:39 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.235 2017/12/08 15:19:13 roberto Exp roberto $ |
3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -141,7 +141,7 @@ void *debug_realloc (void *ud, void *b, size_t oldsize, size_t size) { | |||
141 | freeblock(mc, block); | 141 | freeblock(mc, block); |
142 | return NULL; | 142 | return NULL; |
143 | } | 143 | } |
144 | if (mc->countlimit != ~0UL && size > oldsize) { /* count limit in use? */ | 144 | if (mc->countlimit != ~0UL && size > 0) { /* count limit in use? */ |
145 | if (mc->countlimit == 0) | 145 | if (mc->countlimit == 0) |
146 | return NULL; /* fake a memory allocation error */ | 146 | return NULL; /* fake a memory allocation error */ |
147 | mc->countlimit--; | 147 | mc->countlimit--; |
@@ -1001,6 +1001,7 @@ static int loadlib (lua_State *L) { | |||
1001 | {"math", luaopen_math}, | 1001 | {"math", luaopen_math}, |
1002 | {"string", luaopen_string}, | 1002 | {"string", luaopen_string}, |
1003 | {"table", luaopen_table}, | 1003 | {"table", luaopen_table}, |
1004 | {"T", luaB_opentests}, | ||
1004 | {NULL, NULL} | 1005 | {NULL, NULL} |
1005 | }; | 1006 | }; |
1006 | lua_State *L1 = getstate(L); | 1007 | lua_State *L1 = getstate(L); |