diff --git a/subsys/shell/backends/shell_mqtt.c b/subsys/shell/backends/shell_mqtt.c index 0a4b3f29a43..861cb46526d 100644 --- a/subsys/shell/backends/shell_mqtt.c +++ b/subsys/shell/backends/shell_mqtt.c @@ -86,7 +86,7 @@ bool __weak shell_mqtt_get_devid(char *id, int id_max_len) } (void)memset(id, 0, id_max_len); - length = bin2hex(hwinfo_id, (size_t)length, id, id_max_len - 1); + length = bin2hex(hwinfo_id, (size_t)length, id, id_max_len); return length > 0; }