mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-30 19:11:37 +00:00
efi_loader: ascii2unicode(): add trailing \0
When converting an ASCII string to UTF-16 don't forget to copy the trailing \0. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
9c9021e245
commit
c412166de2
1 changed files with 1 additions and 0 deletions
|
@ -352,6 +352,7 @@ static inline void ascii2unicode(u16 *unicode, const char *ascii)
|
||||||
{
|
{
|
||||||
while (*ascii)
|
while (*ascii)
|
||||||
*(unicode++) = *(ascii++);
|
*(unicode++) = *(ascii++);
|
||||||
|
*unicode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int guidcmp(const efi_guid_t *g1, const efi_guid_t *g2)
|
static inline int guidcmp(const efi_guid_t *g1, const efi_guid_t *g2)
|
||||||
|
|
Loading…
Add table
Reference in a new issue