summaryrefslogtreecommitdiff
path: root/strings/my_vsnprintf.c
diff options
context:
space:
mode:
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;