From: Nathael Pajani Date: Sat, 16 Feb 2019 13:29:45 +0000 (+0100) Subject: Do not try to read part file for nul part id ... X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=5964c4b345cdc2153dec185124459f107d249431;p=soft%2Ftools%2Flpctools Do not try to read part file for nul part id ... --- diff --git a/lpcprog.c b/lpcprog.c index 58b41ef..a85158d 100644 --- 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;