From f80bb3379857ea80797288bb4bb9b3120f143abf Mon Sep 17 00:00:00 2001 From: JKohlman <2236351+JKohlman@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:07:09 -0600 Subject: [PATCH] Added fix for longer names due to TMPro tags (#359) --- src/main/GameReader.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/GameReader.ts b/src/main/GameReader.ts index f62eb6576..1ca3e720a 100644 --- a/src/main/GameReader.ts +++ b/src/main/GameReader.ts @@ -1083,7 +1083,7 @@ export default class GameReader { let name = 'error'; let shiftedColor = -1; if (data.hasOwnProperty('name')) { - name = this.readString(data.name).split(/<.*?>/).join(''); + name = this.readString(data.name, 1000).split(/<.*?>/).join(''); } else { this.readDictionary(data.outfitsPtr, 6, (k, v, i) => { const key = this.readMemory('int32', k); @@ -1091,7 +1091,7 @@ export default class GameReader { if (key === 0 && i == 0) { const namePtr = this.readMemory('pointer', val, this.offsets!.player.outfit.playerName); // 0x40 data.color = this.readMemory('uint32', val, this.offsets!.player.outfit.colorId); // 0x14 - name = this.readString(namePtr).split(/<.*?>/).join(''); + name = this.readString(namePtr, 1000).split(/<.*?>/).join(''); data.hat = this.readString(this.readMemory('ptr', val, this.offsets!.player.outfit.hatId)); data.skin = this.readString(this.readMemory('ptr', val, this.offsets!.player.outfit.skinId)); data.visor = this.readString(this.readMemory('ptr', val, this.offsets!.player.outfit.visorId));