From 04260c4d964cc771373c8e6229eadfe28154e868 Mon Sep 17 00:00:00 2001 From: ellttBen Date: Thu, 21 Jul 2022 11:54:22 +0100 Subject: [PATCH] Fix event queue parsing in TS bindings --- js/src/event_queue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/event_queue.ts b/js/src/event_queue.ts index 4300c62..4ba5c7a 100644 --- a/js/src/event_queue.ts +++ b/js/src/event_queue.ts @@ -169,7 +169,7 @@ export class EventQueue { let capacity = (data.length - EventQueueHeader.LEN) / (EventFill.LEN + 2 * callBackInfoLen); - let callbackInfosOffset = capacity * EventFill.LEN; + let callbackInfosOffset = EventQueueHeader.LEN + capacity * EventFill.LEN; let eventsBuffer = data.slice(EventQueueHeader.LEN, callbackInfosOffset); let callbackInfosBuffer = data.slice(callbackInfosOffset); return new EventQueue({