Commit ae39a1d8 authored by Russ Cox's avatar Russ Cox

cc: correct handling of allocn(0, 1, d)

Fixes #29.

R=r
https://golang.org/cl/152076
parent d38630fe
......@@ -1566,9 +1566,8 @@ alloc(int32 n)
void*
allocn(void *p, int32 n, int32 d)
{
if(p == nil)
return alloc(d);
return alloc(n+d);
p = realloc(p, n+d);
if(p == nil) {
print("allocn out of mem\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment