fix(player) - fix first 8 byte checker (#1240)

* fix(player): fix first 8 byte checker

* fix(player): remove logs

---------

Co-authored-by: nick-delirium <nikita@openreplay.com>
This commit is contained in:
Shekar Siri 2023-05-09 15:20:32 +02:00 committed by GitHub
parent 58ae1317e7
commit 630b018227
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,9 +19,9 @@ export default class MFileReader extends RawMessageReader {
}
public checkForIndexes() {
const firstBytes = this.readCustomIndex(this.buf.slice(0, 9))
// 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff = no indexes
const skipIndexes = firstBytes === 72057594037927940
// 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff = no indexes + weird failover (don't ask)
const skipIndexes = this.readCustomIndex(this.buf.slice(0, 8)) === 72057594037927940
|| this.readCustomIndex(this.buf.slice(0, 9)) === 72057594037927940
if (skipIndexes) {
this.noIndexes = true
this.skip(8)