🐛 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:
@@ -45,7 +45,7 @@ implementation
|
|||||||
|
|
||||||
function TGumpProvider.GetData(AID: Integer; AIndex: TGenericIndex): TMulBlock;
|
function TGumpProvider.GetData(AID: Integer; AIndex: TGenericIndex): TMulBlock;
|
||||||
begin
|
begin
|
||||||
if AIndex.Lookup <> LongInt($FFFFFFFF) then
|
if (AIndex.Lookup > -1) and (AIndex.Size > 0) then
|
||||||
Result := TGump.Create(FData, TGumpIndex(AIndex))
|
Result := TGump.Create(FData, TGumpIndex(AIndex))
|
||||||
else
|
else
|
||||||
Result := TGump.Create(0, 0);
|
Result := TGump.Create(0, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user