diff --git a/examples/system/console/components/cmd_nvs/cmd_nvs.c b/examples/system/console/components/cmd_nvs/cmd_nvs.c index a7e4319c4..c075496ca 100644 --- a/examples/system/console/components/cmd_nvs/cmd_nvs.c +++ b/examples/system/console/components/cmd_nvs/cmd_nvs.c @@ -78,7 +78,7 @@ static nvs_type_t str_to_type(const char *type) { for (int i = 0; i < TYPE_STR_PAIR_SIZE; i++) { const type_str_pair_t *p = &type_str_pair[i]; - if (strncmp(type, p->str, strlen(p->str)) == 0) { + if (strcmp(type, p->str) == 0) { return p->type; } }