Fix for truncated last character on long logged lines.
This commit is contained in:
@@ -154,7 +154,7 @@ void xmpp_log(const xmpp_ctx_t * const ctx,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
oldret = ret;
|
oldret = ret;
|
||||||
ret = xmpp_vsnprintf(buf, ret, fmt, ap);
|
ret = xmpp_vsnprintf(buf, ret + 1, fmt, ap);
|
||||||
if (ret > oldret) {
|
if (ret > oldret) {
|
||||||
xmpp_error(ctx, "log", "Unexpected error");
|
xmpp_error(ctx, "log", "Unexpected error");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user