diff --git a/src/lib/subs/lndsub.c b/src/lib/subs/lndsub.c index 2f678630..db520020 100644 --- a/src/lib/subs/lndsub.c +++ b/src/lib/subs/lndsub.c @@ -1021,7 +1021,8 @@ lnd_mar_one_sector(struct emp_qelem *list, int dir, natid actor) if (CANT_HAPPEN(QEMPTY(list))) return 1; - if (dir <= DIR_STOP || dir >= DIR_VIEW) { + if (dir <= DIR_STOP || dir > DIR_LAST) { + CANT_HAPPEN(dir != DIR_STOP); lnd_mar_put(list, actor); return 1; } diff --git a/src/lib/subs/shpsub.c b/src/lib/subs/shpsub.c index 2182a4a2..58262fdc 100644 --- a/src/lib/subs/shpsub.c +++ b/src/lib/subs/shpsub.c @@ -796,7 +796,8 @@ shp_nav_one_sector(struct emp_qelem *list, int dir, natid actor) if (CANT_HAPPEN(QEMPTY(list))) return 1; - if (dir <= DIR_STOP || dir >= DIR_VIEW) { + if (dir <= DIR_STOP || dir > DIR_LAST) { + CANT_HAPPEN(dir != DIR_STOP); shp_nav_put(list, actor); return 1; }