Fix AllocTemporary on *nix.

This commit is contained in:
whitequark 2015-09-07 16:41:25 -07:00
parent 06be0d1157
commit fdc39edfd8

View File

@ -66,6 +66,7 @@ void *AllocTemporary(size_t n)
(AllocTempHeader *)malloc(n + sizeof(AllocTempHeader)); (AllocTempHeader *)malloc(n + sizeof(AllocTempHeader));
h->prev = NULL; h->prev = NULL;
h->next = Head; h->next = Head;
if(Head) Head->prev = h;
Head = h; Head = h;
memset(&h[1], 0, n); memset(&h[1], 0, n);
return (void *)&h[1]; return (void *)&h[1];