🚨 Guard block requests without coordinates

This commit is contained in:
2026-11-15 22:08:32 +01:00
parent 63ca31805e
commit 992666583d
+2 -1
View File
@@ -210,7 +210,8 @@ end;
constructor TRequestBlocksPacket.Create(ACoords: TBlockCoordsArray); constructor TRequestBlocksPacket.Create(ACoords: TBlockCoordsArray);
begin begin
inherited Create($04, 0); inherited Create($04, 0);
FStream.Write(ACoords[0], Length(ACoords) * SizeOf(TBlockCoords)); if Length(ACoords) > 0 then
FStream.Write(ACoords[0], Length(ACoords) * SizeOf(TBlockCoords));
end; end;
{ TFreeBlockPacket } { TFreeBlockPacket }