From 0f95e48867a19ab754c585c59c5bfca92eadd254 Mon Sep 17 00:00:00 2001 From: qndel Date: Thu, 14 Mar 2019 01:43:13 +0100 Subject: [PATCH] AddTown bin exact fix (#653) --- Source/missiles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/missiles.cpp b/Source/missiles.cpp index 5ff87fd1d99..e9c8beea9c3 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -2217,7 +2217,7 @@ void __fastcall AddTown(int mi, int sx, int sy, int dx, int dy, int midir, int m missile[mi]._miDelFlag = TRUE; for (j = 0; j < 6; j++) { k = CrawlNum[j] + 2; - for (i = 0; i < (unsigned char)CrawlTable[CrawlNum[j]]; i++) { + for (i = (unsigned char)CrawlTable[CrawlNum[j]]; i > 0; i--) { tx = dx + CrawlTable[k - 1]; ty = dy + CrawlTable[k]; if (tx > 0 && tx < MAXDUNX && ty > 0 && ty < MAXDUNY) {