diff options
-rw-r--r-- | ltests.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 1.133 2002/08/06 18:01:50 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 1.134 2002/08/30 19:09:21 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 | */ |
@@ -103,7 +103,7 @@ void *debug_realloc (void *block, size_t oldsize, size_t size) { | |||
103 | freeblock(block); | 103 | freeblock(block); |
104 | return NULL; | 104 | return NULL; |
105 | } | 105 | } |
106 | else if (memdebug_total+size-oldsize > memdebug_memlimit) | 106 | else if (size > oldsize && memdebug_total+size-oldsize > memdebug_memlimit) |
107 | return NULL; /* to test memory allocation errors */ | 107 | return NULL; /* to test memory allocation errors */ |
108 | else { | 108 | else { |
109 | void *newblock; | 109 | void *newblock; |