lib: sbi: Add ' ' '\'' flags for print

The space flag is used to add a space before positive numbers, and
apostrophe is used to print the thousand separator. Add code to
ignore these two flags

Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Xiang W 2023-07-10 00:02:24 +08:00 committed by Anup Patel
parent 40dac06e3c
commit 458fa74266

View file

@ -288,6 +288,10 @@ static int print(char **out, u32 *out_len, const char *format, va_list args)
case '0':
flags |= PAD_ZERO;
break;
case ' ':
case '\'':
/* Ignored flags, do nothing */
break;
default:
flags_done = true;
break;