mapname wasn't set so "(null)" was printed.
Fixes
6ba43753 ("radiant: fix command-line opening on windows").
// Gtk already removed parsed `--options`
if ( argc == 2 ) {
if ( strlen( argv[ 1 ] ) > 1 ) {
- if ( g_str_has_suffix( argv[ 1 ], ".map" ) ) {
- mapname = argv[ 1 ];
+ mapname = argv[ 1 ];
+ if ( g_str_has_suffix( mapname, ".map" ) ) {
if ( !g_path_is_absolute( mapname ) ) {
mapname = g_build_filename( g_get_current_dir(), mapname, NULL );
}
}
else {
g_print( "bad file name, will not load: %s\n", mapname );
+ mapname = NULL;
}
}
}