mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-02 16:44:18 +08:00
monitor: Allow zero-length hex fields with print_hex_field()
This commit is contained in:
parent
1a82ad4108
commit
70d4b26699
@ -1626,6 +1626,8 @@ static void print_hex_field(const char *label, const uint8_t *data,
|
||||
char str[len * 2 + 1];
|
||||
uint8_t i;
|
||||
|
||||
str[0] = '\0';
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
sprintf(str + (i * 2), "%2.2x", data[i]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user