Skip to content

Commit

Permalink
Fix bsock::fsend problem when msglen is zero
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz authored and Marco van Wieringen committed Nov 23, 2015
1 parent 59f11e9 commit fa1e658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/bsock.c
Expand Up @@ -465,7 +465,7 @@ bool BSOCK::fsend(const char *fmt, ...)
va_start(arg_ptr, fmt);
msglen = bvsnprintf(msg, maxlen, fmt, arg_ptr);
va_end(arg_ptr);
if (msglen > 0 && msglen < (maxlen - 5)) {
if (msglen >= 0 && msglen < (maxlen - 5)) {
break;
}
msg = realloc_pool_memory(msg, maxlen + maxlen / 2);
Expand Down

0 comments on commit fa1e658

Please sign in to comment.