summaryrefslogtreecommitdiff
path: root/strings/my_vsnprintf.c
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-05-20 16:14:35 +0300
committermonty@mysql.com <>2005-05-20 16:14:35 +0300
commit0b75f6e37b51fab44357b06fdd1317397169f4da (patch)
treeaa7fb9173589000beb4052d77262a95532b07c2e /strings/my_vsnprintf.c
parented674271d46fdc0f0ea2bde408d00c45e74fe72a (diff)
downloadmariadb-git-0b75f6e37b51fab44357b06fdd1317397169f4da.tar.gz
compatibility issues
Fixed errors reported by valgrind (some errors in NDB remains)
Diffstat (limited to 'strings/my_vsnprintf.c')
-rw-r--r--strings/my_vsnprintf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
index 4d7c17e977c..935cc2d380d 100644
--- a/strings/my_vsnprintf.c
+++ b/strings/my_vsnprintf.c
@@ -135,6 +135,16 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
to+= res_length;
continue;
}
+ else if (*fmt == 'c') /* Character parameter */
+ {
+ register int larg;
+ if (to == end)
+ break;
+ larg = va_arg(ap, int);
+ *to++= (char) larg;
+ continue;
+ }
+
/* We come here on '%%', unknown code or too long parameter */
if (to == end)
break;