mbimmodem: Fix conversion of strings into UTF16-LE on big endian

This commit is contained in:
Marcel Holtmann 2018-10-31 21:00:12 +01:00
parent 63ed2c2080
commit 2df69194ac
1 changed files with 1 additions and 1 deletions

View File

@ -1130,7 +1130,7 @@ bool mbim_message_builder_append_basic(struct mbim_message_builder *builder,
if (L_CPU_TO_LE16(0x8000) != 0x8000) {
size_t i;
for (i = 0; i < len - 2; i += 2)
for (i = 0; i < len / 2; i++)
utf16[i] = __builtin_bswap16(utf16[i]);
}