aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ltests.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ltests.c b/ltests.c
index 886996b4..d6f8adc4 100644
--- a/ltests.c
+++ b/ltests.c
@@ -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;