Ensure pgm->parseextparams()'s LIBAVRDUDE_EXIT return exits in main.c

This commit is contained in:
Stefan Rueger
2024-04-25 19:45:33 +01:00
parent 7db0b673dd
commit c7bffb4018

View File

@@ -1243,7 +1243,10 @@ int main(int argc, char * argv [])
pmsg_error("programmer does not support extended parameter -x %s, option ignored\n", extended_param);
}
} else {
if (pgm->parseextparams(pgm, extended_params) < 0) {
int rc = pgm->parseextparams(pgm, extended_params);
if(rc == LIBAVRDUDE_EXIT)
exit(0);
if(rc < 0) {
pmsg_error("unable to parse extended parameter list\n");
exit(1);
}