From 302b5bfb6b7f6a63aac30f913118d7eb887f268c Mon Sep 17 00:00:00 2001 From: OlivierHecart Date: Mon, 18 Mar 2024 10:44:57 +0100 Subject: [PATCH] Fix z_pub arguments parsing --- examples/z_pub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } }