From 001e8ec67406926efe65ac8a761336112068cb50 Mon Sep 17 00:00:00 2001 From: James Canete Date: Thu, 21 Feb 2008 22:45:21 +0000 Subject: [PATCH] Fix for truncated last character on long logged lines. --- src/ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ctx.c b/src/ctx.c index 61bdbae..2c2bb65 100644 --- a/src/ctx.c +++ b/src/ctx.c @@ -154,7 +154,7 @@ void xmpp_log(const xmpp_ctx_t * const ctx, return; } oldret = ret; - ret = xmpp_vsnprintf(buf, ret, fmt, ap); + ret = xmpp_vsnprintf(buf, ret + 1, fmt, ap); if (ret > oldret) { xmpp_error(ctx, "log", "Unexpected error"); return;