Fix xgetopt use in prospector tool, optopt from cstdlib was used instead.

develop
Petr Mrázek 2011-05-02 23:32:32 +02:00
parent 967d630936
commit ec2fc375fb
1 changed files with 5 additions and 5 deletions

@ -5,7 +5,7 @@
// -s : don't show slade // -s : don't show slade
// -t : don't show demon temple // -t : don't show demon temple
#include <cstdlib> //#include <cstdlib>
#include <iostream> #include <iostream>
#include <iomanip> #include <iomanip>
#include <map> #include <map>
@ -49,15 +49,15 @@ bool parseOptions(int argc, char **argv, bool &showHidden, bool &showPlants,
showTemple = false; showTemple = false;
break; break;
case '?': case '?':
switch (optopt) switch (opt.optopt)
{ {
// For when we take arguments // For when we take arguments
default: default:
if (isprint(optopt)) if (isprint(opt.optopt))
std::cerr << "Unknown option -" << optopt << "!" std::cerr << "Unknown option -" << opt.optopt << "!"
<< std::endl; << std::endl;
else else
std::cerr << "Unknown option character " << (int) optopt << "!" std::cerr << "Unknown option character " << (int) opt.optopt << "!"
<< std::endl; << std::endl;
} }
default: default: