diff --git a/README.md b/README.md index 36848e0..9e68d97 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,7 @@ int main(int argc, char* argv[]) { // -d char const * optstring = "ab:c:d"; int opt_a = 0; - char* opt:w - _b = 0; + char* opt_b = 0; char* opt_c = 0; int opt_d = 0; diff --git a/source/getopt.c b/source/getopt.c index 4cb6af1..1b1140c 100644 --- a/source/getopt.c +++ b/source/getopt.c @@ -122,7 +122,7 @@ static int _getopt_(int argc, char* const argv[], ++optind; optarg = argv[optind]; } else { - optarg = pos_eq + 1; + optarg = (char*)pos_eq + 1; } break; }