summaryrefslogtreecommitdiff
path: root/lib/vsprintf.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-02-18 15:48:01 -0500
committerTom Rini <trini@konsulko.com>2019-02-18 15:48:01 -0500
commitbeff8e34b22d708df11b32b6ed27be49ba345875 (patch)
tree24e03177fb25d4721a77ddaa38218579c3455353 /lib/vsprintf.c
parent500ad54e35c636b0a05170753da58fcd8c8de6f2 (diff)
parent997fc12ec91eccf6b7485565864f3eb8ce74def2 (diff)
Merge tag 'efi-2019-04-rc2' of https://github.com/xypron2/u-boot
The patches fix multiple errors. Mentionable are: - EFI unit tests (bootefi selftest) can run on i386. - `make tests` executes the Unicode unit tests. The LoadImage patch is preparing for further rework to be delivered in v2019.07.
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r--lib/vsprintf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index de5db1aa5c..1b6c154d8d 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -288,6 +288,8 @@ static char *string16(char *buf, char *end, u16 *s, int field_width,
for (i = 0; i < len && buf + utf16_utf8_strnlen(str, 1) <= end; ++i) {
s32 s = utf16_get(&str);
+ if (s < 0)
+ s = '?';
utf8_put(s, &buf);
}
for (; len < field_width; --field_width)