zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: pws-20: fix remhist() crash
@ 1999-06-07  4:46 Wayne Davison
  0 siblings, 0 replies; only message in thread
From: Wayne Davison @ 1999-06-07  4:46 UTC (permalink / raw)
  To: ZSH workers mailing list

Here's a fix for the crash in remhist().  It causes some calls to
remhist() to be ignored as invalid.  I'm still looking at the
calling code to try to figure out a better fix than this, but this
should keep the shell from crashing for now.

..wayne..

---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: Src/hist.c
--- zsh-3.1.5-pws-20/Src/hist.c	Mon May 17 00:34:25 1999
+++ ./Src/hist.c	Sun Jun  6 21:18:59 1999
@@ -984,6 +984,8 @@
 void
 remhist(void)
 {
+    if (hist_ring == &curline)
+	return;
     if (!(histactive & HA_ACTIVE)) {
 	if (!(histactive & HA_JUNKED)) {
 	    freehistnode((HashNode)hist_ring);
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-06-07  4:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-07  4:46 PATCH: pws-20: fix remhist() crash Wayne Davison

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).