fix(player): fix for message reader (#597)

This commit is contained in:
Delirium 2022-07-12 19:03:11 +02:00 committed by GitHub
parent 55d7830154
commit 6c9e83920f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -21,7 +21,7 @@ export default class MFileReader extends RawMessageReader {
return this.buf[ this.p + i ] - this.buf[ this.pLastMessageID + i ] < 0
}
}
return true
return false
}
private readRawMessage(): RawMessage | null {
@ -70,4 +70,4 @@ export default class MFileReader extends RawMessageReader {
})
return [msg, this.pLastMessageID]
}
}
}

View file

@ -1,4 +1,5 @@
export default class PrimitiveReader {
/** pointer for curent position in the buffer */
protected p: number = 0
constructor(protected buf: Uint8Array = new Uint8Array(0)) {}