Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug in history changes



On Wed, 20 Feb 2002, Peter Stephenson wrote:
> The latest version of the history code is causing zcalc to crash.

I'm ashamed to say that my last patch still left a stupid bug in
prepnexthistent().  I just committed the following fix to CVS.

..wayne..

---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: Src/hist.c
--- Src/hist.c	18 Feb 2002 19:25:25 -0000	1.41
+++ Src/hist.c	20 Feb 2002 19:22:20 -0000
@@ -971,7 +971,8 @@
     }
     else {
 	putoldhistentryontop(0);
-	freehistdata(he = hist_ring, 0);
+	freehistdata(hist_ring, 0);
+	he = hist_ring;
     }
     he->histnum = ++curhist;
     if (curline_in_ring)
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---



Messages sorted by: Reverse Date, Date, Thread, Author