fix: Implementation of `rotateLeft` function in `src/messagenametag.ts`

This commit is contained in:
Emil Ivanichkov 2024-01-25 14:18:53 +02:00 committed by richΛrd
parent 4be1418b58
commit 54e0fd5759
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ export class MessageNametagBuffer {
if (k < 0 || this.buffer.length == 0) {
return;
}
const idx = this.buffer.length - (k % this.buffer.length);
const idx = k % this.buffer.length;
const a1 = this.buffer.slice(idx);
const a2 = this.buffer.slice(0, idx);
this.buffer = a1.concat(a2);