Fix dumping to file producing garbage (#3)

* Fix dumping to file producing garbage

* Use rawWrite instead of casting to char[]
This commit is contained in:
forbjok 2016-12-10 18:45:43 +01:00 committed by Petar Kirov
parent edf871df22
commit 6e0ef1aae0

View file

@ -58,11 +58,11 @@ class YFile : YStream {
}
void writeExact(const void* buffer, size_t size) {
this.file.write(cast(const ubyte[])buffer[0 .. size]);
this.file.rawWrite(cast(const) buffer[0 .. size]);
}
size_t write(const(ubyte)[] buffer) {
this.file.write(buffer);
this.file.rawWrite(buffer);
return buffer.length;
}