From 846402e9dccc1394ea5ea6c5e455009e9553bac3 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Thu, 14 Nov 2024 15:46:52 +0100 Subject: [PATCH] fix loading firmware from command-line --- src/x49gpng/options.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/x49gpng/options.c b/src/x49gpng/options.c index 00dbe60..3862ebc 100644 --- a/src/x49gpng/options.c +++ b/src/x49gpng/options.c @@ -216,6 +216,7 @@ void config_init( char* progname, int argc, char* argv[] ) break; case 'f': do_reflash = true; + opt.firmware = strdup( optarg ); break; case 'F': do_reflash_full = true; @@ -337,10 +338,6 @@ void config_init( char* progname, int argc, char* argv[] ) if ( opt.reinit < X49GP_REINIT_FLASH ) opt.reinit = X49GP_REINIT_FLASH; - if ( opt.firmware != NULL ) - fprintf( stderr, "Additional firmware file \"%s\" specified, overriding\n", optarg ); - opt.firmware = optarg; - if ( do_reflash_full ) opt.reinit = X49GP_REINIT_FLASH_FULL; }