From ffbad4801861f86f9a39aff9c4fb3057c3e82060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Gim=C3=A9nez?= Date: Wed, 8 May 2024 22:04:26 +0900 Subject: [PATCH] early return --- pkg/memory/item.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/memory/item.go b/pkg/memory/item.go index 4870068..6ebcf28 100644 --- a/pkg/memory/item.go +++ b/pkg/memory/item.go @@ -153,12 +153,12 @@ func (gd *GameReader) getItemStats(statsListExPtr uintptr) (stat.Stats, stat.Sta for (0x40 & statListFlags & 0xFFFFDFFF) == 0 { attempts++ if attempts == 10 { - break + return baseStats, fullStats } statListPrev = uintptr(gd.Process.ReadUInt(statListPrev+0x48, Uint64)) statListFlags = uintptr(gd.Process.ReadUInt(statListPrev+0x1C, Uint64)) if statListPrev == 0 { - break + return baseStats, fullStats } } modifierStats := gd.getStatsList(statListPrev + 0x88)