Also implement buffer toString in asc

This commit is contained in:
dcodeIO
2018-03-31 00:16:12 +02:00
parent 2e5077da2d
commit 72063577f3
4 changed files with 36 additions and 3 deletions

View File

@ -836,7 +836,8 @@ function createMemoryStream(fn) {
return buffer;
};
stream.toString = function() {
return this.toBuffer().toString("utf8");
var buffer = this.toBuffer();
return utf8.read(buffer, 0, buffer.length);
};
return stream;
}