From 551f2fd80d8bc11e92391cb20c180dbde573db86 Mon Sep 17 00:00:00 2001 From: Laurent Ghigonis Date: Thu, 27 Jun 2013 23:37:38 +0200 Subject: gg_map: improve argparse --- gg_map/gg_map.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gg_map/gg_map.c') diff --git a/gg_map/gg_map.c b/gg_map/gg_map.c index a73042f..73f125e 100644 --- a/gg_map/gg_map.c +++ b/gg_map/gg_map.c @@ -373,8 +373,8 @@ elm_main(int argc, char **argv) } } switch (argc - optind) { - case 2: gg_serv_port = atoi(argv[3]); - case 1: strncpy(gg_serv_ip, argv[2], sizeof(gg_serv_ip)); + case 2: gg_serv_port = atoi(argv[2]); + case 1: strncpy(gg_serv_ip, argv[1], sizeof(gg_serv_ip)); case 0: break; default: -- cgit v1.2.3-59-g8ed1b