🐛 Skip gump entries with no data

An index entry with a valid lookup but zero size copied the entire
rest of the gump file into memory before decoding garbage.
This commit is contained in:
2026-11-15 22:06:51 +01:00
parent d2fb8a16ea
commit 0c94cdb24b
+1 -1
View File
@@ -45,7 +45,7 @@ implementation
function TGumpProvider.GetData(AID: Integer; AIndex: TGenericIndex): TMulBlock;
begin
if AIndex.Lookup <> LongInt($FFFFFFFF) then
if (AIndex.Lookup > -1) and (AIndex.Size > 0) then
Result := TGump.Create(FData, TGumpIndex(AIndex))
else
Result := TGump.Create(0, 0);