From a82b8fd53213f4fe31de45132a47400ca74edb76 Mon Sep 17 00:00:00 2001 From: khtsly Date: Sat, 14 Feb 2026 00:05:28 +0700 Subject: [PATCH] chore(buffer): update buffer to use u16 for id --- src/Util/Buffer/init.luau | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Util/Buffer/init.luau b/src/Util/Buffer/init.luau index ed4d619..e5168f3 100644 --- a/src/Util/Buffer/init.luau +++ b/src/Util/Buffer/init.luau @@ -1647,7 +1647,7 @@ local function writeEvents(w: Writer, events: { { any } }, schemas: { [number]: for _, event in events do local id = event[1] local args = event[2] - wByte(w, id) + wU16(w, id) local schema = schemas[id] if schema then packStrict(w, schema, args[1]) @@ -1662,8 +1662,8 @@ local function readEvents(buf: buffer, refs: { any }?, schemas: { [number]: Sche count, pos = readVarUInt(buf, pos) local events = table.create(count) for i = 1, count do - local id: number = buffer.readu8(buf, pos) - pos += 1 + local id: number = buffer.readu16(buf, pos) + pos += 2 local args: any local schema = schemas[id] if schema then