Wrong read length on uInt read
This commit is contained in:
parent
2463cc3dbc
commit
59709ec34c
|
@ -47,8 +47,8 @@ class FLYSocket {
|
||||||
let ret = [];
|
let ret = [];
|
||||||
let length = data.getUint8(this.pointer++);
|
let length = data.getUint8(this.pointer++);
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
ret.push( data.getUint16(this.pointer) );
|
ret.push( data.getUint32(this.pointer) );
|
||||||
this.pointer += 2;
|
this.pointer += 4;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ class FLYSocket {
|
||||||
// I: FlightUUID
|
// I: FlightUUID
|
||||||
// ?: Subscribed to flight data
|
// ?: Subscribed to flight data
|
||||||
let ret = [];
|
let ret = [];
|
||||||
ret.push( data.getUint16(this.pointer) ); this.pointer += 2;
|
ret.push( data.getUint32(this.pointer) ); this.pointer += 4;
|
||||||
ret.push( data.getUint8(this.pointer++) != 0 );
|
ret.push( data.getUint8(this.pointer++) != 0 );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ class FLYSocket {
|
||||||
// I: FlightUUID
|
// I: FlightUUID
|
||||||
// ?: Flight active
|
// ?: Flight active
|
||||||
let ret = [];
|
let ret = [];
|
||||||
ret.push( data.getUint16(this.pointer) ); this.pointer += 2;
|
ret.push( data.getUint32(this.pointer) ); this.pointer += 4;
|
||||||
ret.push( data.getUint8(this.pointer++) != 0 );
|
ret.push( data.getUint8(this.pointer++) != 0 );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user