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:
parent
edf871df22
commit
6e0ef1aae0
|
@ -58,11 +58,11 @@ class YFile : YStream {
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeExact(const void* buffer, size_t size) {
|
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) {
|
size_t write(const(ubyte)[] buffer) {
|
||||||
this.file.write(buffer);
|
this.file.rawWrite(buffer);
|
||||||
return buffer.length;
|
return buffer.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue