Fix a bug pointed out by valgrind: OutBuffer::write4() was writing 8 bytes on

platforms with 64-bit longs.
This commit is contained in:
Frits van Bommel
2009-05-08 12:21:53 +02:00
parent cde738111c
commit 5c29832ee7

View File

@@ -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;
}