From 072b3a866eed2746e8708c563a46c91dd1fc18b2 Mon Sep 17 00:00:00 2001
From: Alexandre Abadie <alexandre.abadie@inria.fr>
Date: Tue, 27 Feb 2018 10:08:53 +0100
Subject: [PATCH] test/pkg_semtech-loramac: fix loramac set devaddr

---
 tests/pkg_semtech-loramac/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/pkg_semtech-loramac/main.c b/tests/pkg_semtech-loramac/main.c
index c536fdf433..27f009931a 100644
--- a/tests/pkg_semtech-loramac/main.c
+++ b/tests/pkg_semtech-loramac/main.c
@@ -205,7 +205,7 @@ static int _cmd_loramac(int argc, char **argv)
             fmt_hex_bytes(nwkskey, argv[3]);
             semtech_loramac_set_nwkskey(nwkskey);
         }
-        else if (strcmp("devaddr", argv[3]) == 0) {
+        else if (strcmp("devaddr", argv[2]) == 0) {
             if ((argc < 4) || (strlen(argv[3]) != LORAMAC_DEVADDR_LEN * 2)) {
                 puts("Usage: loramac set devaddr <8 hex chars>");
                 return 1;
-- 
GitLab