Skip to content

Commit

Permalink
tests: kv interactive: correct parsing len
Browse files Browse the repository at this point in the history
  • Loading branch information
bradjc committed Sep 6, 2023
1 parent 593a49d commit 1509176
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/tests/kv_interactive/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ int main(void) {

printf("[KV Interactive] Text interface to KV store\n");
printf("\n");
printf("Please enter a command: get, set, or delete\n");
printf("Please enter a command: get, set/add/update, or delete\n");
printf(" get <key>\n");
printf(" set <key> <value>\n");
printf(" add <key> <value>\n");
Expand Down Expand Up @@ -151,7 +151,7 @@ int main(void) {
printf("Added key-value\n");
}

} else if (strncmp(read_buf, "update", 3) == 0) {
} else if (strncmp(read_buf, "update", 6) == 0) {
int key_start = 7;
int key_end = find_end(key_start);
int key_len = key_end - key_start;
Expand Down

0 comments on commit 1509176

Please sign in to comment.