From 91ea951d35e0941f99c2560df76cace79176e1d1 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Debian Linux)" <rob@synchro.net>
Date: Tue, 13 May 2025 19:55:35 -0700
Subject: [PATCH] Break scan loop on abort (Ctrl-C)

Fixes issue #926
---
 src/sbbs3/readmsgs.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/sbbs3/readmsgs.cpp b/src/sbbs3/readmsgs.cpp
index 8dac9db7c1..8bf6eb6fc1 100644
--- a/src/sbbs3/readmsgs.cpp
+++ b/src/sbbs3/readmsgs.cpp
@@ -771,8 +771,11 @@ int sbbs_t::scanposts(int subnum, int mode, const char *find)
 				}
 			}
 		}
-		else
+		else {
+			if (sys_status & SS_ABORT)
+				break;
 			domsg = 1;
+		}
 		if (mode & SCAN_CONT) {
 			if (smb.curmsg < smb.msgs - 1)
 				smb.curmsg++;
-- 
GitLab