🐛 Free the client statics decode buffer on malformed data
This commit is contained in:
+10
-7
@@ -523,14 +523,17 @@ begin
|
|||||||
begin
|
begin
|
||||||
AData.Position := AIndex.Lookup;
|
AData.Position := AIndex.Lookup;
|
||||||
block := TMemoryStream.Create;
|
block := TMemoryStream.Create;
|
||||||
block.CopyFrom(AData, AIndex.Size);
|
try
|
||||||
block.Position := 0;
|
block.CopyFrom(AData, AIndex.Size);
|
||||||
for i := 1 to (AIndex.Size div 7) do
|
block.Position := 0;
|
||||||
begin
|
for i := 1 to (AIndex.Size div 7) do
|
||||||
item := TStaticItem.Create(Self, block, AX, AY);
|
begin
|
||||||
Cells[(item.Y mod 8) * 8 + (item.X mod 8)].Add(item);
|
item := TStaticItem.Create(Self, block, AX, AY);
|
||||||
|
Cells[(item.Y mod 8) * 8 + (item.X mod 8)].Add(item);
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
block.Free;
|
||||||
end;
|
end;
|
||||||
block.Free;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user