1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-06-18 21:38:03 +02:00

51597: fix 'vared -c var' when var is unset

This commit is contained in:
Jun-ichi Takimoto 2023-04-03 16:04:31 +09:00
parent c006d76097
commit b411dc5702
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2023-04-03 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 51597: Src/Zle/zle_utils.c: fix 'vared -c var' when var is unset
2023-03-30 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 51604: Src/jobs.c, configure.ac: %M in TIMEFMT should report

View file

@ -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;