diff options
| author | dana <dana@dana.is> | 2025-05-13 22:11:59 -0500 |
|---|---|---|
| committer | dana <dana@dana.is> | 2025-05-13 22:14:09 -0500 |
| commit | a2f390701ad0fe2253c721356138ec21b7120362 (patch) | |
| tree | c36e6593874965d24be45c6c9b13520384022cc4 /Src | |
| parent | 53602: "typeset -nu" always refers to at a call level above the declaration (diff) | |
| download | zsh-a2f390701ad0fe2253c721356138ec21b7120362.tar zsh-a2f390701ad0fe2253c721356138ec21b7120362.tar.gz zsh-a2f390701ad0fe2253c721356138ec21b7120362.tar.bz2 zsh-a2f390701ad0fe2253c721356138ec21b7120362.tar.lz zsh-a2f390701ad0fe2253c721356138ec21b7120362.tar.xz zsh-a2f390701ad0fe2253c721356138ec21b7120362.tar.zst zsh-a2f390701ad0fe2253c721356138ec21b7120362.zip | |
53588: zsystem flock: handle optargs in the same word
with small tweak to test, just in case
Diffstat (limited to 'Src')
| -rw-r--r-- | Src/Modules/system.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/Modules/system.c b/Src/Modules/system.c index 929a8b002..f1c0d7042 100644 --- a/Src/Modules/system.c +++ b/Src/Modules/system.c @@ -572,7 +572,7 @@ bin_zsystem_flock(char *nam, char **args, UNUSED(Options ops), UNUSED(int func)) /* variable for fd */ if (optptr[1]) { fdvar = optptr + 1; - optptr += strlen(fdvar) - 1; + optptr += strlen(fdvar); } else if (*args) { fdvar = *args++; } @@ -592,7 +592,7 @@ bin_zsystem_flock(char *nam, char **args, UNUSED(Options ops), UNUSED(int func)) /* timeout in seconds */ if (optptr[1]) { optarg = optptr + 1; - optptr += strlen(optarg) - 1; + optptr += strlen(optarg); } else if (!*args) { zwarnnam(nam, "flock: option %c requires a numeric timeout", opt); @@ -622,7 +622,7 @@ bin_zsystem_flock(char *nam, char **args, UNUSED(Options ops), UNUSED(int func)) /* retry interval in seconds */ if (optptr[1]) { optarg = optptr + 1; - optptr += strlen(optarg) - 1; + optptr += strlen(optarg); } else if (!*args) { zwarnnam(nam, "flock: option %c requires " |
