diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 5c03f1f..15c7c32 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -2099,7 +2099,9 @@ extern struct globals_var *const ash_ptr_to_globals_var; static void FAST_FUNC getoptsreset(const char *value) { - shellparam.optind = number(value) ?: 1; + shellparam.optind = 1; + if (is_number(value)) + shellparam.optind = number(value) ?: 1; shellparam.optoff = -1; } #endif |