bug fix: vsnprintf_s return value 0 isn't error (#373)

Conforming with vsnprintf_s
This commit is contained in:
shiyuge 2020-07-07 11:21:28 +08:00 committed by GitHub
parent cdceb28deb
commit 8e79dd6554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {