🚨 Stop region saves with exactly 256 areas from wiping them

The count was clamped to 256 and then stored in a byte, wrapping to
zero, so the server replaced the region with an empty area list.
This commit is contained in:
2026-11-15 22:08:32 +01:00
parent 818590ded0
commit 9864157f33
+1 -1
View File
@@ -162,7 +162,7 @@ begin
inherited Create($03, 0); //Admin Packet inherited Create($03, 0); //Admin Packet
FStream.WriteByte($08); //Admin PacketID FStream.WriteByte($08); //Admin PacketID
FStream.WriteStringNull(ARegionInfo.Name); FStream.WriteStringNull(ARegionInfo.Name);
count := Min(ARegionInfo.Areas.Count, 256); count := Min(ARegionInfo.Areas.Count, 255);
FStream.WriteByte(count); FStream.WriteByte(count);
for i := 0 to count - 1 do for i := 0 to count - 1 do
begin begin