authorNathael Pajani <nathael.pajani@ed3l.fr>
Sat, 16 Feb 2019 13:29:45 +0000 (14:29 +0100)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Sat, 16 Feb 2019 13:29:45 +0000 (14:29 +0100)
lpcprog.c

index 58b41ef..a85158d 100644 (file)
--- a/lpcprog.c
+++ b/lpcprog.c
@@ -237,6 +237,10 @@ int main(int argc, char** argv)
                printf("Unable to connect to target, consider hard reset of target or link\n");
                return -1;
        }
+       if (dev_id == 0) {
+               printf("Communication error, bad target id (0), please retry\n");
+               return -1;
+       }
 
        if (command != NULL)  {
                int err = 0;