Ddded cli check for ism330dlc startup to prevent hardfault if no options are given.

This commit is contained in:
dino 2019-12-16 16:23:14 +01:00 committed by Beat Küng
parent e4a526e3b2
commit 49cb21016a
1 changed files with 5 additions and 0 deletions

View File

@ -132,6 +132,11 @@ extern "C" __EXPORT int ism330dlc_main(int argc, char *argv[])
}
}
if (myoptind >= argc) {
ism330dlc::usage();
return -1;
}
const char *verb = argv[myoptind];
if (!strcmp(verb, "start")) {