diff options
author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2023-04-03 16:04:31 +0900 |
---|---|---|
committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2023-04-03 16:04:31 +0900 |
commit | b411dc570217f337540c018f82797f248ec81754 (patch) | |
tree | a4393c88967a976b389d79ba7adb226d0c87ddd9 /Src | |
parent | c006d7609703afcfb2162c36d4f745125df45879 (diff) | |
download | zsh-b411dc570217f337540c018f82797f248ec81754.tar.gz zsh-b411dc570217f337540c018f82797f248ec81754.tar.xz zsh-b411dc570217f337540c018f82797f248ec81754.zip |
51597: fix 'vared -c var' when var is unset
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c index 454a877a9..51bb43339 100644 --- a/Src/Zle/zle_utils.c +++ b/Src/Zle/zle_utils.c @@ -512,12 +512,13 @@ stringaszleline(char *instr, int incs, int *outll, int *outsz, int *outcs) *outcs = outptr - outstr; *outll = outptr - outstr; } else { + *outstr = ZWC('\0'); *outll = 0; if (outcs) *outcs = 0; } #else - memcpy(outstr, instr, ll); + strcpy(outstr, instr); *outll = ll; if (outcs) *outcs = incs; |