diff options
Diffstat (limited to 'wgetopt.cpp')
-rw-r--r-- | wgetopt.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/wgetopt.cpp b/wgetopt.cpp index 08ccc3b1..2d2117f6 100644 --- a/wgetopt.cpp +++ b/wgetopt.cpp @@ -270,7 +270,7 @@ exchange(wchar_t **argv) { /* Bottom segment is the short one. */ int len = middle - bottom; - register int i; + int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) @@ -286,7 +286,7 @@ exchange(wchar_t **argv) { /* Top segment is the short one. */ int len = top - middle; - register int i; + int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) @@ -638,7 +638,10 @@ _wgetopt_internal(int argc, wchar_t *const *argv, const wchar_t *optstring, cons fwprintf(stderr, _(L"%ls: Invalid option -- %lc\n"), argv[0], c); } woptopt = c; - woptind++; + + if (*nextchar != '\0') + woptind++; + return '?'; } if (temp[1] == ':') |