diff options
author | jani@dsl-jkl1657.dial.inet.fi <> | 2002-05-31 16:23:36 +0300 |
---|---|---|
committer | jani@dsl-jkl1657.dial.inet.fi <> | 2002-05-31 16:23:36 +0300 |
commit | 0b5e2d989649fe99d65911668e1fc56ad4025d43 (patch) | |
tree | b73ab847a4ef48828e842f70b70edca3388cf241 /mysys/my_getopt.c | |
parent | 673f67f6d12f16c3eeda44e4cbf811cc8fd10b89 (diff) | |
download | mariadb-git-0b5e2d989649fe99d65911668e1fc56ad4025d43.tar.gz |
Fixed a bug in my_getopt.
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r-- | mysys/my_getopt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index 720dae7520a..76cdbede78d 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -324,8 +324,9 @@ int handle_options(int *argc, char ***argv, } else /* must be short option */ { - for (optend= cur_arg; *optend; optend++, opt_found= 0) + for (optend= cur_arg; *optend; optend++) { + opt_found= 0; for (optp= longopts; optp->id; optp++) { if (optp->id == (int) (uchar) *optend) @@ -379,7 +380,7 @@ int handle_options(int *argc, char ***argv, { if (my_getopt_print_errors) fprintf(stderr, - "%s: unknown option '-%c'\n", progname, *cur_arg); + "%s: unknown option '-%c'\n", progname, *optend); return EXIT_UNKNOWN_OPTION; } } |