summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-11-09 09:11:52 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-11-09 09:11:52 +0000
commitee5ab9cc136baf18756abc6bd5d136a0231f973e (patch)
treeabdc351cbffd7b67f63f41ea08f544819af0a28b /gc.c
parentdc8da69e7cbc54f020ef1182fd28e57bbaa40fc3 (diff)
1.1c7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index 3322352224..bf5124e66d 100644
--- a/gc.c
+++ b/gc.c
@@ -95,6 +95,7 @@ xrealloc(ptr, size)
ArgError("negative re-allocation size");
}
if (!ptr) return xmalloc(size);
+ if (size == 0) size = 1;
malloc_memories += size;
mem = realloc(ptr, size);
if (!mem) {