[librsvg] (#542): Fix infinite loop when processing sibling combinators



commit 5d379d2b28141b755b27235d2ce6b155e2e77020
Author: Federico Mena Quintero <federico gnome org>
Date:   Mon Jan 6 22:01:16 2020 -0600

    (#542): Fix infinite loop when processing sibling combinators
    
    I am a dumbass.
    
    Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/542

 rsvg_internals/src/css.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rsvg_internals/src/css.rs b/rsvg_internals/src/css.rs
index 9cc0bda1..4327c141 100644
--- a/rsvg_internals/src/css.rs
+++ b/rsvg_internals/src/css.rs
@@ -415,7 +415,7 @@ impl selectors::Element for RsvgElement {
                 return sibling.map(|n| n.into());
             }
 
-            sibling = self.0.previous_sibling();
+            sibling = sib.previous_sibling();
         }
 
         None
@@ -430,7 +430,7 @@ impl selectors::Element for RsvgElement {
                 return sibling.map(|n| n.into());
             }
 
-            sibling = self.0.next_sibling();
+            sibling = sib.next_sibling();
         }
 
         None


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