mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
Improve null splitting on rfactor
This commit is contained in:
parent
81750805f6
commit
82084ad38e
2 changed files with 4 additions and 4 deletions
|
|
@ -68,7 +68,8 @@ class Rfactor extends Core {
|
|||
|
||||
// Consumes bytesToConsume, but only returns string up to the first null
|
||||
readString(reader, bytesToConsume) {
|
||||
return reader.string(bytesToConsume).replace(/\0.*$/g,'');
|
||||
const consumed = reader.part(bytesToConsume);
|
||||
return this.reader(consumed).string();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue