diff options
| author | Andre Przywara <[email protected]> | 2017-01-02 11:48:29 +0000 |
|---|---|---|
| committer | Jagan Teki <[email protected]> | 2017-01-04 16:37:41 +0100 |
| commit | 1c853629d936f88d7d41bdd01a3bd8c55391e754 (patch) | |
| tree | 9806e5a9a8b7f8cb170d3fa770e73cd4c81302cd /lib/tiny-printf.c | |
| parent | a28e1d98310e62dc88947b91d17105b58de01889 (diff) | |
SPL: tiny-printf: ignore "-" modifier
tiny-printf does not know about the "-" modifier, which aligns numbers.
This is used by some SPL code, but as it's purely cosmetical, we just
ignore this modifier here to avoid changing correct printf strings.
Signed-off-by: Andre Przywara <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Jagan Teki <[email protected]>
Diffstat (limited to 'lib/tiny-printf.c')
| -rw-r--r-- | lib/tiny-printf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c index 0b8512faf5b..dfa843240fc 100644 --- a/lib/tiny-printf.c +++ b/lib/tiny-printf.c @@ -69,6 +69,9 @@ int _vprintf(struct printf_info *info, const char *fmt, va_list va) bool islong = false; ch = *(fmt++); + if (ch == '-') + ch = *(fmt++); + if (ch == '0') { ch = *(fmt++); lz = 1; |
