Skip to content

Commit

Permalink
bug fix: vsnprintf_s return value 0 isn't error (#373)
Browse files Browse the repository at this point in the history
Conforming with vsnprintf_s
  • Loading branch information
shiyuge authored Jul 7, 2020
1 parent cdceb28 commit 8e79dd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/logcapture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8e79dd6

Please sign in to comment.