diff --git a/examples/z_pub.c b/examples/z_pub.c index 543cba694..ecc95e42d 100644 --- a/examples/z_pub.c +++ b/examples/z_pub.c @@ -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); } }