From 249c6590069c10eaee251fa2b1b0feb5b056b9f1 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Wed, 15 Feb 2023 16:16:22 -0800 Subject: [PATCH] Adds coord validity check for job scanning in dig-now --- plugins/dig-now.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/dig-now.cpp b/plugins/dig-now.cpp index 68a5361a5..4084ca279 100644 --- a/plugins/dig-now.cpp +++ b/plugins/dig-now.cpp @@ -86,6 +86,9 @@ public: df::job_list_link* node = df::global::world->jobs.list.next; while (node) { df::job* job = node->item; + if(!Maps::isValidTilePos(job->pos)) + continue; + jobs.emplace(job->pos, job); node = node->next; df::tile_designation td = map.designationAt(job->pos);