From ff33ed6d74677face0e3f22990f469bd9dfdc70f Mon Sep 17 00:00:00 2001 From: Kelly Wilson Date: Thu, 12 Mar 2009 17:10:24 -0600 Subject: [PATCH] Revert removal of "+2" from Outbuffer::reserve function for x64. Unless somone can fix this properly, then the "+2" must stay in or tango won't build. --- dmd/root.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dmd/root.c b/dmd/root.c index b8807b7f..63453f0b 100644 --- a/dmd/root.c +++ b/dmd/root.c @@ -1391,7 +1391,11 @@ void OutBuffer::reserve(unsigned nbytes) //printf("OutBuffer::reserve: size = %d, offset = %d, nbytes = %d\n", size, offset, nbytes); if (size - offset < nbytes) { - size = (offset + nbytes) * 2; +#if defined (__x86_64__) + size = (offset + nbytes) * 2 + 2; +#else + size = (offset + nbytes) * 2 + 2; +#endif data = (unsigned char *)mem.realloc(data, size); } }