ASAN: correct another bound problems...

This commit is contained in:
Laurent Alonso(fr)
2020-05-23 16:55:37 +02:00
committed by Celtic Minstrel
parent 70108be987
commit 674ebfdc8b

View File

@@ -2972,10 +2972,10 @@ bool town_move_party(location destination,short forced) {
forced = true;
if(univ.debug_mode && univ.ghost_mode)
forced = keep_going = true;
ter = univ.town->terrain(destination.x,destination.y);
if(keep_going) {
// ASAN destination is only correct if keep_going=true
ter = univ.town->terrain(destination.x,destination.y);
if(univ.party.in_boat >= 0) {
if((!is_blocked(destination)) && (!is_special(destination))
// If to bridge, exit if heading diagonal, keep going if heading horiz or vert