1
0
Fork 0

Make FG_OPTIONS_EXIT work.

'fgfs --version' wants to exit...
This commit is contained in:
ThorstenB 2012-03-17 12:01:51 +01:00
parent 194520b77e
commit 22c20a2f09

View file

@ -1998,9 +1998,16 @@ void Options::processOptions()
OptionValueVec::const_iterator it;
for (it = groupBegin; it != groupEnd; ++it) {
int result = p->processOption(it->desc, it->value);
if (result == FG_OPTIONS_ERROR) {
showUsage();
exit(-1);
switch(result)
{
case FG_OPTIONS_ERROR:
showUsage();
exit(-1); // exit and return an error
case FG_OPTIONS_EXIT:
exit(0); // clean exit
break;
default:
break;
}
}