return after asserting an illegal retreat direction

When no cardinal direction resolves, ubDirection stays 255 and the
tail feeds it to GetSectorMvtTimeForGroup, which reads
SectorInfo[...].ubTraversability[255] on a UINT8[5]. This runs in
release too, since that read is a plain call, not an assert. Bail out
instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Marco Antonio J. Costa
2026-08-09 12:23:01 -03:00
committed by majcosta
co-authored by Claude Opus 4.8
parent 9a19e21cd5
commit c9100aacee
+1
View File
@@ -4653,6 +4653,7 @@ void RetreatGroupToPreviousSector( GROUP *pGroup )
AssertMsg( 0, String("Player group attempting illegal retreat from %c%d to %c%d.",
pGroup->ubSectorY+'A'-1, pGroup->ubSectorX, pGroup->ubNextY+'A'-1, pGroup->ubNextX ) );
return;
}
//Calc time to get to next waypoint...