From e551978ff9dfcb7d0d840eba458ca1d3b45e0832 Mon Sep 17 00:00:00 2001 From: Aotumuri Date: Sun, 1 Jun 2025 18:42:54 +0900 Subject: [PATCH] fixed --- src/client/TerritoryPatterns.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/client/TerritoryPatterns.ts b/src/client/TerritoryPatterns.ts index 762c041cd..70b03f054 100644 --- a/src/client/TerritoryPatterns.ts +++ b/src/client/TerritoryPatterns.ts @@ -32,10 +32,9 @@ export class PatternDecoder { throw new Error("The pattern versions are different."); } - const view = new DataView(bytes.buffer, bytes.byteOffset + 1, 6); - this.tileWidth = view.getUint16(0, false); - this.tileHeight = view.getUint16(2, false); - this.scale = view.getUint16(4, false); + this.tileWidth = (bytes[1] << 8) | bytes[2]; + this.tileHeight = (bytes[3] << 8) | bytes[4]; + this.scale = (bytes[5] << 8) | bytes[6]; this.dataStart = 7; this.bytes = bytes; }