From b8a9efb721b7e31d8cfda895efcd6007e8fb8a8d Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 28 Mar 2026 10:31:53 -0700 Subject: [PATCH] fix: abort movement block on spline parse failure instead of corrupting stream When both WotLK compressed and uncompressed spline point parsing fail, the parser was silently continuing with a corrupted read position (16 bytes of WotLK spline header already consumed). This caused the update mask to read garbage (maskBlockCount=40), corrupting the current entity AND all remaining blocks in the same UPDATE_OBJECT packet. Now returns false on spline failure, cleanly aborting the single block parse and allowing the remaining blocks to be recovered (if the parser can resync). Also logs the failing GUID and spline flags for debugging. This fixes: - Entities spawning with displayId=0/entry=0 (corrupted parse) - "Unknown update type: 128" errors from reading garbage - Falling through the ground (terrain entities lost in corrupted batch) - Phantom "fish on your line" from fishing bobber entity parse failure --- src/game/world_packets.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/world_packets.cpp b/src/game/world_packets.cpp index 37e7d139..1a557496 100644 --- a/src/game/world_packets.cpp +++ b/src/game/world_packets.cpp @@ -1036,6 +1036,12 @@ bool UpdateObjectParser::parseMovementBlock(network::Packet& packet, UpdateBlock if (!splineParsed) { splineParsed = tryParseSplinePoints(false, "wotlk-uncompressed"); } + if (!splineParsed) { + LOG_WARNING("Spline parse failed for guid=0x", std::hex, block.guid, std::dec, + " splineFlags=0x", std::hex, splineFlags, std::dec, + " — aborting movement block"); + return false; + } } } else if (updateFlags & UPDATEFLAG_POSITION) {