Closed JoshVorick closed 9 years ago
return errors for invalid settings please
The replacement for getopt isn't perfect, but I think it now covers all the big bases. Meaning no seg faults, exits on unknown flag (see line 289-293 to see where the implementation is a bit hacky). But it works how it should in all common use cases (correct and incorrect).
./sia-gpu-miner --help
"Please use a valid flag. Use "--help" for options
./sia-gpu-miner -h
"Please use a valid flag. Use "--help" for options
actually, I get that for all flags. Please test your program before committing.
The error for all flags being invalid was because I started i at 0 and "./sia-gpu-miner" is an invalid flag. Oops. Fixed it though.
no seg faults please