From b5e4cabe4d37702cb860873760cc450e803fc2f9 Mon Sep 17 00:00:00 2001 From: sophie Date: Fri, 3 May 2024 00:52:41 +0300 Subject: [PATCH] warning for incorrect decrypt size --- bun.lockb | Bin 8825 -> 8825 bytes classes/World.ts | 4 ++++ 2 files changed, 4 insertions(+) diff --git a/bun.lockb b/bun.lockb index 1227409c633b84d876f857a987963db8e7fa6461..c71b6efeb15798a1aa43535f56c9523ed2e8f8c5 100755 GIT binary patch delta 20 bcmezA^3!F5zBoH$oROY^p3!DAac6D-PP+yb delta 20 YcmezA^3!F5zBoG*0~l;J6L;nY07E?l$N&HU diff --git a/classes/World.ts b/classes/World.ts index ee2f545..90a9385 100644 --- a/classes/World.ts +++ b/classes/World.ts @@ -99,6 +99,10 @@ export class World { this.data = ungziped.slice(cborSize+4); this.dataView = new DataView(this.data.buffer); + + if(4 + this.size.x * this.size.y * this.size.z == this.data.length) { + console.log('[WARNING] Encoding was wrong somewhere!') + } } catch(e) { const layers = Math.floor(this.size.y / 2);