mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
Ensure that created buffers aren't doing any charset conversion
This commit is contained in:
parent
906c21be61
commit
d6d7fee80f
3 changed files with 3 additions and 3 deletions
|
|
@ -174,7 +174,7 @@ module.exports = require('./core').extend({
|
|||
sendPacket: function(type,sendChallenge,payload,expect,callback,ontimeout) {
|
||||
var self = this;
|
||||
|
||||
if(typeof payload == 'string') payload = new Buffer(payload);
|
||||
if(typeof payload == 'string') payload = new Buffer(payload,'binary');
|
||||
var challengeLength = sendChallenge !== false ? 4 : 0;
|
||||
var payloadLength = payload ? payload.length : 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue