[PATCH] Fix chkmail loop break condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



padvance_magic() returns -1 when there are no more paths left, not
zero.
---
 src/mail.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mail.c b/src/mail.c
index e6baaa1b..ec5bd103 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -80,7 +80,7 @@ chkmail(void)
 		int len;
 
 		len = padvance_magic(&mpath, nullstr, 2);
-		if (!len)
+		if (len == -1)
 			break;
 		p = stackblock();
 		if (*p == '\0')
-- 
2.33.0




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux