From dbaa2968cc8e4c222c2a80543cd9972e977e2ee0 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Thu, 28 Mar 2024 01:19:33 +0900 Subject: [PATCH] Fix decoding issue in pngChunk.ts --- src/ts/pngChunk.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ts/pngChunk.ts b/src/ts/pngChunk.ts index 6f92409d..07a59599 100644 --- a/src/ts/pngChunk.ts +++ b/src/ts/pngChunk.ts @@ -101,7 +101,7 @@ export const PngChunk = { for(let i=0;i<70;i++){ if(chunkData[i] === 0){ key = new TextDecoder().decode(chunkData.slice(0,i)) - value = new TextDecoder().decode(chunkData.slice(i)) + value = new TextDecoder().decode(chunkData.slice(i + 1)) break } } @@ -184,7 +184,7 @@ export const PngChunk = { for(let i=0;i<70;i++){ if(chunkData[i] === 0){ key = new TextDecoder().decode(chunkData.slice(0,i)) - value = new TextDecoder().decode(chunkData.slice(i)) + value = new TextDecoder().decode(chunkData.slice(i+1)) break } }