Skip to content

Commit

Permalink
Fix z_pub arguments parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHecart committed Mar 18, 2024
1 parent 52cb521 commit 302b5bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/z_pub.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ int main(int argc, char **argv) {

z_owned_config_t config = z_config_default();
if (argc > 4) {
if (zc_config_insert_json(z_loan(config), Z_CONFIG_CONNECT_KEY, argv[3]) < 0) {
if (zc_config_insert_json(z_loan(config), Z_CONFIG_CONNECT_KEY, argv[4]) < 0) {
printf(
"Couldn't insert value `%s` in configuration at `%s`. This is likely because `%s` expects a "
"JSON-serialized list of strings\n",
argv[3], Z_CONFIG_CONNECT_KEY, Z_CONFIG_CONNECT_KEY);
argv[4], Z_CONFIG_CONNECT_KEY, Z_CONFIG_CONNECT_KEY);
exit(-1);
}
}
Expand Down

0 comments on commit 302b5bf

Please sign in to comment.