[vte/vte-0-36] ring: Fix stream reset



commit c004921c26eec0183ef2f07ee76803efb3d9eeb1
Author: Egmont Koblinger <egmont gmail com>
Date:   Wed Oct 23 00:27:26 2013 +0200

    ring: Fix stream reset
    
    Change suspicios code: resetting row_stream to 0 is fishy, I really do think
    it needs to be set to ring->writable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=336238#c75

 src/ring.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/ring.c b/src/ring.c
index 4caf2d4..c00acda 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -375,7 +375,7 @@ _vte_ring_discard_one_row (VteRing *ring)
 {
        ring->start++;
        if (G_UNLIKELY (ring->start == ring->writable)) {
-               _vte_ring_reset_streams (ring, 0);
+               _vte_ring_reset_streams (ring, ring->writable);
        } else {
                VteRowRecord record;
                _vte_stream_advance_tail (ring->row_stream, ring->start * sizeof (record));
@@ -463,7 +463,7 @@ _vte_ring_resize (VteRing *ring, gulong max_rows)
        if ((gulong) _vte_ring_length (ring) > max_rows) {
                ring->start = ring->end - max_rows;
                if (ring->start >= ring->writable) {
-                       _vte_ring_reset_streams (ring, 0);
+                       _vte_ring_reset_streams (ring, ring->writable);
                        ring->writable = ring->start;
                }
        }


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