mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-18 09:35:50 +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
|
|
@ -14,9 +14,8 @@ class Samp extends Core {
|
|||
{
|
||||
const reader = await this.sendPacket('i');
|
||||
if (this.isVcmp) {
|
||||
let version = reader.string(12);
|
||||
version = version.replace(/\0.*$/g,'');
|
||||
state.raw.version = version;
|
||||
const consumed = reader.part(12);
|
||||
state.raw.version = this.reader(consumed).string();
|
||||
}
|
||||
state.password = !!reader.uint(1);
|
||||
state.raw.numplayers = reader.uint(2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue