changeset 1315:c48dcf2e2c02

Fix a bug pointed out by valgrind: OutBuffer::write4() was writing 8 bytes on platforms with 64-bit longs.
author Frits van Bommel <fvbommel wxs.nl>
date Fri, 08 May 2009 12:21:53 +0200
parents acc5d68a21d3
children 8c65217be813
files dmd/root/root.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dmd/root/root.c	Thu May 07 21:49:58 2009 +0200
+++ b/dmd/root/root.c	Fri May 08 12:21:53 2009 +0200
@@ -1594,7 +1594,7 @@
 void OutBuffer::write4(unsigned w)
 {
     reserve(4);
-    *(unsigned long *)(this->data + offset) = w;
+    *(unsigned *)(this->data + offset) = w;
     offset += 4;
 }