diff options
| author | Kamil Dudka <kdudka@redhat.com> | 2019-07-26 17:24:59 +0200 |
|---|---|---|
| committer | Peter Stephenson <p.stephenson@samsung.com> | 2019-07-26 16:36:14 +0100 |
| commit | d6a9e222ec6b006c09d6f84beae6ef488a19b214 (patch) | |
| tree | 966799a824bb062619f6ae91b99c594a5afa316e /Src | |
| parent | 44566: make sure Zle doesn't crash if history entry not found (diff) | |
| download | zsh-d6a9e222ec6b006c09d6f84beae6ef488a19b214.tar zsh-d6a9e222ec6b006c09d6f84beae6ef488a19b214.tar.gz zsh-d6a9e222ec6b006c09d6f84beae6ef488a19b214.tar.bz2 zsh-d6a9e222ec6b006c09d6f84beae6ef488a19b214.tar.lz zsh-d6a9e222ec6b006c09d6f84beae6ef488a19b214.tar.xz zsh-d6a9e222ec6b006c09d6f84beae6ef488a19b214.tar.zst zsh-d6a9e222ec6b006c09d6f84beae6ef488a19b214.zip | |
44582: Fix foregoing commit to use DPUTS() better
Diffstat (limited to 'Src')
| -rw-r--r-- | Src/Zle/zle_utils.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c index d549b885b..2b306fdcd 100644 --- a/Src/Zle/zle_utils.c +++ b/Src/Zle/zle_utils.c @@ -1608,10 +1608,9 @@ unapplychange(struct change *ch) { if(ch->hist != histline) { Histent he = quietgethist(ch->hist); - if(!he) { - dputs(ERRMSG("quietgethist(ch->hist) returned NULL")); + DPUTS(he == NULL, "quietgethist(ch->hist) returned NULL"); + if(he == NULL) return 1; - } zle_setline(he); zlecs = ch->new_cs; return 0; @@ -1653,10 +1652,9 @@ applychange(struct change *ch) { if(ch->hist != histline) { Histent he = quietgethist(ch->hist); - if(!he) { - dputs(ERRMSG("quietgethist(ch->hist) returned NULL")); + DPUTS(he == NULL, "quietgethist(ch->hist) returned NULL"); + if(he == NULL) return 1; - } zle_setline(he); zlecs = ch->old_cs; return 0; |
