[vte] sixel: Fix omitted data syntax reset when mismatched controls



commit 144bd35be3640612786bed3b087dfd99309abd02
Author: Christian Persch <chpe src gnome org>
Date:   Fri Feb 5 00:35:15 2021 +0100

    sixel: Fix omitted data syntax reset when mismatched controls
    
    At the end of parsing the sixel data, we always need to
    pop_data_syntax(). The code was incorrectly omitting that in
    the case of mismatched controls.

 src/vte.cc | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 48742d83..64193498 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -3901,12 +3901,11 @@ Terminal::process_incoming_decsixel(ProcessingContext& context,
                 /* Like the main parser, the sequence only takes effect
                  * if introducer and terminator match (both C0 or both C1).
                  */
-                if (!m_sixel_context->is_matching_controls())
-                        break;
-
-                try {
-                        insert_image(context, m_sixel_context->image_cairo());
-                } catch (...) {
+                if (m_sixel_context->is_matching_controls()) {
+                        try {
+                                insert_image(context, m_sixel_context->image_cairo());
+                        } catch (...) {
+                        }
                 }
 
                 [[fallthrough]];


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