[vte] [ring] Fix assertion failure with resize



commit 6946347f771d48393b4a1eb30dc52e40489582f1
Author: Behdad Esfahbod <behdad behdad org>
Date:   Tue Sep 15 21:26:22 2009 -0400

    [ring] Fix assertion failure with resize

 src/ring.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/ring.c b/src/ring.c
index 11ccd99..a8d0e99 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -437,8 +437,10 @@ _vte_ring_resize (VteRing *ring, guint max_rows)
 	/* Adjust the start of tail chunk now */
 	if (_vte_ring_length (ring) > max_rows) {
 		ring->start = ring->end - max_rows;
-		if (ring->start >= ring->writable)
+		if (ring->start >= ring->writable) {
 			_vte_ring_reset_streams (ring, 0);
+			ring->writable = ring->start;
+		}
 	}
 
 	ring->max = max_rows;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]