Skip to content
Snippets Groups Projects
Commit 5df792da authored by deuce's avatar deuce
Browse files

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)
parent b1030801
No related branches found
No related tags found
No related merge requests found
...@@ -565,9 +565,17 @@ char *xp_asprintf_next(char *format, int type, ...) ...@@ -565,9 +565,17 @@ char *xp_asprintf_next(char *format, int type, ...)
va_start(vars, type); va_start(vars, type);
switch(type & ~XP_PRINTF_CONVERT) { switch(type & ~XP_PRINTF_CONVERT) {
case XP_PRINTF_TYPE_INT: /* Also includes char and short */ 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); i=va_arg(vars, int);
break; break;
case XP_PRINTF_TYPE_UINT: /* Also includes char and short */ 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); ui=va_arg(vars, unsigned int);
break; break;
case XP_PRINTF_TYPE_LONG: case XP_PRINTF_TYPE_LONG:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment