diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-10-23 22:27:36 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-10-23 23:30:56 +0200 |
commit | 32034e483b9b9755901f715681d5f1be12110d00 (patch) | |
tree | e6b12c5237287019206be8ca10f68ccd98227983 | |
parent | b840b84f5fcb0ba2783093ee6d7ffe5aa122b418 (diff) |
libmbim-glib,tlv: fix string reading in BE systems
The data length needs to be converted to HE before using it.
-rw-r--r-- | src/libmbim-glib/mbim-tlv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmbim-glib/mbim-tlv.c b/src/libmbim-glib/mbim-tlv.c index df5fba6..ca87edd 100644 --- a/src/libmbim-glib/mbim-tlv.c +++ b/src/libmbim-glib/mbim-tlv.c @@ -240,7 +240,7 @@ mbim_tlv_string_get (const MbimTlv *self, } utf16 = (const gunichar2 *) MBIM_TLV_FIELD_DATA (self); - size = MBIM_TLV_FIELD_DATA_LENGTH (self); + size = MBIM_TLV_GET_DATA_LENGTH (self); /* For BE systems, convert from LE to BE */ if (G_BYTE_ORDER == G_BIG_ENDIAN) { |