From 8e79dd655471cb6d670ca588a81a259f3d240362 Mon Sep 17 00:00:00 2001 From: shiyuge Date: Tue, 7 Jul 2020 11:21:28 +0800 Subject: [PATCH] bug fix: vsnprintf_s return value 0 isn't error (#373) Conforming with vsnprintf_s --- src/logcapture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logcapture.cpp b/src/logcapture.cpp index 14a4bb6..2e2604c 100644 --- a/src/logcapture.cpp +++ b/src/logcapture.cpp @@ -97,7 +97,7 @@ void LogCapture::capturef(const char *printf_like_message, ...) { #endif va_end(arglist); - if (nbrcharacters <= 0) { + if (nbrcharacters < 0) { stream() << "\n\tERROR LOG MSG NOTIFICATION: Failure to successfully parse the message"; stream() << '"' << printf_like_message << '"' << std::endl; } else if (nbrcharacters > finished_message_len) {