Skip to content

Commit

Permalink
Fixed gengetopt bug with config file name
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Rit committed Feb 5, 2015
1 parent 1311e03 commit d1450e8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions code/rtkMacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@
exit(1); \
} \
bool bConfig = args_info.config_given; \
char *configFile = args_info.config_arg; \
std::string configFile; \
if(args_info.config_given) \
configFile = args_info.config_arg; \
cmdline_parser_##ggo_filename##_free(&args_info); \
if (bConfig) \
if (configFile != "") \
{ \
if(0 != cmdline_parser_##ggo_filename##_config_file (configFile, &args_info, &args_params) ) \
if(0 != cmdline_parser_##ggo_filename##_config_file (configFile.c_str(), &args_info, &args_params) ) \
{ \
std::cerr << "Error in cmdline_parser_" #ggo_filename "_config_file" << std::endl; \
exit(1); \
Expand Down

0 comments on commit d1450e8

Please sign in to comment.