mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 15:17:36 +00:00
Fix title encoding for fivem fixes #83
This commit is contained in:
parent
e2c734577a
commit
52ad7b1fd5
2 changed files with 3 additions and 2 deletions
|
|
@ -12,14 +12,14 @@ class Quake2 extends require('./core') {
|
|||
this.udpSend('\xff\xff\xff\xff'+this.sendHeader+'\x00', (buffer) => {
|
||||
const reader = this.reader(buffer);
|
||||
|
||||
const header = reader.string({length:4});
|
||||
const header = reader.string({length:4,encoding:'latin1'});
|
||||
if(header !== '\xff\xff\xff\xff') return;
|
||||
|
||||
let response;
|
||||
if(this.isQuake1) {
|
||||
response = reader.string({length:this.responseHeader.length});
|
||||
} else {
|
||||
response = reader.string();
|
||||
response = reader.string({encoding:'latin1'});
|
||||
}
|
||||
if(response !== this.responseHeader) return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue