From 4b8960ce83d29a63c71ea39b4376d5d9b78b5cdf Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Thu, 6 Aug 2026 20:48:33 +0100 Subject: Don't skip the last entry in a log file (?) --- cbits/znc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cbits/znc.c') diff --git a/cbits/znc.c b/cbits/znc.c index 3647395..5ed6d41 100644 --- a/cbits/znc.c +++ b/cbits/znc.c @@ -347,7 +347,7 @@ size_t tirclogv_count_lines(const char *buf, size_t len) { size_t numln = 0; if (len == 0) return 0; - if (buf[len - 1] == '\n') len--; // we actually count the number of '\n' below + if (buf[len - 1] != '\n') len++; // we actually count the number of '\n' below const int vecwidth = 16; const int unrollcount = 2; -- cgit v1.3.1