mirror of
https://github.com/jwetzell/rttrp-js.git
synced 2026-09-16 03:12:58 +00:00
add decoder for lighting output
This commit is contained in:
@@ -13,7 +13,7 @@ export default (bytes: Uint8Array, isLittleEndian: boolean = false): Universe =>
|
||||
|
||||
const size = view.getUint16(dataOffset, isLittleEndian);
|
||||
dataOffset += 2;
|
||||
if (size !== bytes.byteLength) {
|
||||
if (size < bytes.byteLength) {
|
||||
throw new Error('Universe module size mismatch');
|
||||
}
|
||||
const id = view.getUint16(dataOffset, isLittleEndian);
|
||||
|
||||
Reference in New Issue
Block a user