summaryrefslogtreecommitdiff
path: root/strings/my_vsnprintf.c
diff options
context:
space:
mode:
authorreggie@mdk10.(none) <>2005-05-19 16:02:14 -0500
committerreggie@mdk10.(none) <>2005-05-19 16:02:14 -0500
commit0e8e44e70dd13ef8c0f011ed2a9002102547692a (patch)
treef73ffd83cb856936fa46f2db58d48470f0ee1cf2 /strings/my_vsnprintf.c
parentb5a60fe2a83b022a15bc7cef6bdeb4b75a79c0c5 (diff)
downloadmariadb-git-0e8e44e70dd13ef8c0f011ed2a9002102547692a.tar.gz
BUG# 10687 - MERGE engine fails under Windows
This patch was submitted by Ingo and it appears to work correctly.
Diffstat (limited to 'strings/my_vsnprintf.c')
-rw-r--r--strings/my_vsnprintf.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
index 268f7d18f2a..d92b291321b 100644
--- a/strings/my_vsnprintf.c
+++ b/strings/my_vsnprintf.c
@@ -28,7 +28,8 @@
%#[l]u
%#[l]x
%#.#s Note first # is ignored
-
+ %c
+
RETURN
length of result string
*/
@@ -120,6 +121,11 @@ int my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap)
to+= res_length;
continue;
}
+ else if (*fmt == 'c')
+ {
+ *(to++)= (char) va_arg(ap, int);
+ continue;
+ }
/* We come here on '%%', unknown code or too long parameter */
if (to == end)
break;