]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commit
cfgfile: handle missing command line option values
authorStefan Reinauer <stefan.reinauer@coreboot.org>
Wed, 17 Jun 2026 14:30:16 +0000 (07:30 -0700)
committerStefan Reinauer <stefan.reinauer@coreboot.org>
Wed, 17 Jun 2026 19:27:31 +0000 (12:27 -0700)
commit7763cc77a7fe11dd71983e072b295cad69884e0e
tree0bb77318b2a3c709ceaea61e986a8019be0d511c
parentdffef38ec9ed66fb51df795498ceb4914269883b
cfgfile: handle missing command line option values

parse_cmdline_option() keeps unknown command line options in the
all_lines list. A trailing option such as -G reaches this path without
a value, which passed NULL to my_strdup() and crashed before the GUI
could start.

Store an empty string when no value is present so argument-less
options can still be represented in the saved option list.
cfgfile.cpp