mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-20 03:51:07 +02:00
26091: crash at end of history line if history not in use
This commit is contained in:
parent
21e1b38ffb
commit
fed941ce24
2 changed files with 13 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-11-25 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* 26091: Src/hist.c: crash at end of history line if history
|
||||||
|
not in use.
|
||||||
|
|
||||||
2008-11-24 Peter Stephenson <pws@csr.com>
|
2008-11-24 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
* Frank Terbeck: users/13482: Doc/Zsh/contrib.yo: fix some prompt
|
* Frank Terbeck: users/13482: Doc/Zsh/contrib.yo: fix some prompt
|
||||||
|
|
14
Src/hist.c
14
Src/hist.c
|
@ -1130,12 +1130,14 @@ hend(Eprog prog)
|
||||||
&& (hist_ignore_all_dups = isset(HISTIGNOREALLDUPS)) != 0)
|
&& (hist_ignore_all_dups = isset(HISTIGNOREALLDUPS)) != 0)
|
||||||
histremovedups();
|
histremovedups();
|
||||||
|
|
||||||
/*
|
if (hptr) {
|
||||||
* Added the following in case the test "hptr < chline + 1"
|
/*
|
||||||
* is more than just paranoia.
|
* Added the following in case the test "hptr < chline + 1"
|
||||||
*/
|
* is more than just paranoia.
|
||||||
DPUTS(hptr < chline, "History end pointer off start of line");
|
*/
|
||||||
*hptr = '\0';
|
DPUTS(hptr < chline, "History end pointer off start of line");
|
||||||
|
*hptr = '\0';
|
||||||
|
}
|
||||||
addlinknode(hookargs, "zshaddhistory");
|
addlinknode(hookargs, "zshaddhistory");
|
||||||
addlinknode(hookargs, chline);
|
addlinknode(hookargs, chline);
|
||||||
callhookfunc("zshaddhistory", hookargs, 1, &hookret);
|
callhookfunc("zshaddhistory", hookargs, 1, &hookret);
|
||||||
|
|
Loading…
Reference in a new issue