From aff2f4e428d4cdb63cfc98374a3259c6495e94ba Mon Sep 17 00:00:00 2001 From: dragonmux Date: Fri, 5 Aug 2022 00:44:37 +0100 Subject: [PATCH] hosted/cli: Made sure the command line options structure is initialised with opt_mode = BMP_MODE_DEBUG before args parsing --- src/platforms/hosted/cli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platforms/hosted/cli.c b/src/platforms/hosted/cli.c index 1046bac..656b47a 100644 --- a/src/platforms/hosted/cli.c +++ b/src/platforms/hosted/cli.c @@ -235,6 +235,7 @@ void cl_init(BMP_CL_OPTIONS_t *opt, int argc, char **argv) opt->opt_flash_start = 0xffffffff; opt->opt_max_swj_frequency = 4000000; opt->opt_scanmode = BMP_SCAN_SWD; + opt->opt_mode = BMP_MODE_DEBUG; while((c = getopt_long(argc, argv, "eEhHv:d:f:s:I:c:Cln:m:M:wVtTa:S:jApP:rR::", long_options, NULL)) != -1) { switch(c) { case 'c':