From 5df792dae2751471b0be4c17232da2012b700cce Mon Sep 17 00:00:00 2001 From: deuce <> Date: Thu, 22 Dec 2005 18:54:32 +0000 Subject: [PATCH] Add a ToDo note regarding %c with a value of zero... should this terminate the string, or should it replace the %c with "[null]" instead (similar to what %s does with a NULL) --- src/xpdev/xpprintf.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/xpdev/xpprintf.c b/src/xpdev/xpprintf.c index f7d2dc2bf0..cbbc1740bf 100644 --- a/src/xpdev/xpprintf.c +++ b/src/xpdev/xpprintf.c @@ -565,9 +565,17 @@ char *xp_asprintf_next(char *format, int type, ...) va_start(vars, type); switch(type & ~XP_PRINTF_CONVERT) { case XP_PRINTF_TYPE_INT: /* Also includes char and short */ + /* + * ToDo: If it's a %c, and the value is 0, should it output [null] + * or should it terminate the string? + */ i=va_arg(vars, int); break; case XP_PRINTF_TYPE_UINT: /* Also includes char and short */ + /* + * ToDo: If it's a %c, and the value is 0, should it output [null] + * or should it terminate the string? + */ ui=va_arg(vars, unsigned int); break; case XP_PRINTF_TYPE_LONG: -- GitLab