Skip to content

Commit 596ab84

Browse files
committed
Make copy of bytes with Uint8Array since they can be reused by decoder
1 parent a59d527 commit 596ab84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addons/addon-image/src/kitty/KittyGraphicsHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@ export class KittyGraphicsHandler implements IApcHandler, IResetHandler {
308308

309309
switch (action) {
310310
case KittyAction.TRANSMIT:
311-
return this._handleTransmit(cmd, bytes, decodeError);
311+
return this._handleTransmit(cmd, new Uint8Array(bytes), decodeError);
312312
case KittyAction.TRANSMIT_DISPLAY:
313-
return this._handleTransmitDisplay(cmd, bytes, decodeError);
313+
return this._handleTransmitDisplay(cmd, new Uint8Array(bytes), decodeError);
314314
case KittyAction.QUERY:
315315
return this._handleQuery(cmd, bytes, decodeError);
316316
default:

0 commit comments

Comments
 (0)