summaryrefslogtreecommitdiff
path: root/strings/my_vsnprintf.c
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-04-21 12:44:29 +0500
committerunknown <bar@bar.mysql.r18.ru>2003-04-21 12:44:29 +0500
commit1db8654191c18def869c03d246e75be704411d03 (patch)
tree53809f135effdd67fbba8f296a86fc9bfb6ea737 /strings/my_vsnprintf.c
parenta320421abc6fc425c14a647534fae0883e4fec1d (diff)
downloadmariadb-git-1db8654191c18def869c03d246e75be704411d03.tar.gz
my_vsnprintf.c:
The last character was not printed into out string strings/my_vsnprintf.c: The last character was not printed into out string
Diffstat (limited to 'strings/my_vsnprintf.c')
-rw-r--r--strings/my_vsnprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
index a9fdc3718a8..deb9448857e 100644
--- a/strings/my_vsnprintf.c
+++ b/strings/my_vsnprintf.c
@@ -84,7 +84,7 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
if (*fmt == 's') /* String parameter */
{
reg2 char *par = va_arg(ap, char *);
- uint plen,left_len = (uint)(end-to);
+ uint plen,left_len = (uint)(end-to)+1;
if (!par) par = (char*)"(null)";
plen = (uint) strlen(par);
if (left_len <= plen)