os: support %% in pnprintf

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Peter Hutterer
2013-02-14 16:13:22 +10:00
parent 5ea21560dd
commit 58ef34ee6d
2 changed files with 8 additions and 0 deletions

View File

@@ -450,6 +450,9 @@ pnprintf(char *string, size_t size, const char *f, va_list args)
string[s_idx++] = number[i];
}
break;
case '%':
string[s_idx++] = '%';
break;
default:
va_arg(args, char*);
string[s_idx++] = '%';