From b0f6aed4a1a7ff27609b15d77f683a8d4923b0b7 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Sun, 31 May 2026 23:03:46 -0700 Subject: [PATCH] fix(common): pass radix 10 when parsing OSC color indices InputHandler parsed palette indices from OSC color sequences with parseInt without a radix after validating digits-only slots. Use base 10 for set/report and restore color index parsing. Co-authored-by: Cursor --- src/common/InputHandler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/InputHandler.ts b/src/common/InputHandler.ts index 9d725cd1b..0b12dd8e1 100644 --- a/src/common/InputHandler.ts +++ b/src/common/InputHandler.ts @@ -3065,7 +3065,7 @@ export class InputHandler extends Disposable implements IInputHandler { const idx = slots.shift() as string; const spec = slots.shift() as string; if (/^\d+$/.exec(idx)) { - const index = parseInt(idx); + const index = parseInt(idx, 10); if (isValidColorIndex(index)) { if (spec === '?') { event.push({ type: ColorRequestType.REPORT, index }); @@ -3228,7 +3228,7 @@ export class InputHandler extends Disposable implements IInputHandler { const slots = data.split(';'); for (let i = 0; i < slots.length; ++i) { if (/^\d+$/.exec(slots[i])) { - const index = parseInt(slots[i]); + const index = parseInt(slots[i], 10); if (isValidColorIndex(index)) { event.push({ type: ColorRequestType.RESTORE, index }); }