From 5c29832ee7fd99b6a079fd0e3e94a79d419f9646 Mon Sep 17 00:00:00 2001 From: Frits van Bommel Date: Fri, 8 May 2009 12:21:53 +0200 Subject: [PATCH] Fix a bug pointed out by valgrind: OutBuffer::write4() was writing 8 bytes on platforms with 64-bit longs. --- dmd/root/root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmd/root/root.c b/dmd/root/root.c index 18cd20e4..7b32759e 100644 --- a/dmd/root/root.c +++ b/dmd/root/root.c @@ -1594,7 +1594,7 @@ void OutBuffer::writeUTF16(unsigned w) void OutBuffer::write4(unsigned w) { reserve(4); - *(unsigned long *)(this->data + offset) = w; + *(unsigned *)(this->data + offset) = w; offset += 4; }