Mercurial > projects > ldc
diff dmd/root.c @ 741:4ac97ec7c18e
Applied easy part from wilsonk's x86-64 patch in #107
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Thu, 30 Oct 2008 11:08:34 +0100 |
parents | 50383e476c7e |
children | fa306ca8843b |
line wrap: on
line diff
--- a/dmd/root.c Thu Oct 30 10:17:05 2008 +0100 +++ b/dmd/root.c Thu Oct 30 11:08:34 2008 +0100 @@ -1379,10 +1379,14 @@ void OutBuffer::reserve(unsigned nbytes) { - //printf("OutBuffer::reserve: size = %d, offset = %d, nbytes = %d\n", size, offset, nbytes); + //printf("OutBuffer::reserve: size = %d, offset = %d, nbytes = %d\n", size, offset, nbytes); if (size - offset < nbytes) { +#if defined (__x86_64__) + size = (offset + nbytes) * 2+2; +#else size = (offset + nbytes) * 2; +#endif data = (unsigned char *)mem.realloc(data, size); } }