From cb46999c45ea5816c123194c11d695a0320ac74e Mon Sep 17 00:00:00 2001 From: Marcel Greter Date: Thu, 11 Jan 2018 06:55:10 +0100 Subject: [PATCH] Fix endless loop comparing Selector_List to List --- src/ast.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ast.cpp b/src/ast.cpp index fbfd5b2573..46b769c3d7 100644 --- a/src/ast.cpp +++ b/src/ast.cpp @@ -448,10 +448,10 @@ namespace Sass { } // Selector lists can be compared to comma lists - bool Selector_List::operator==(const Expression& rhs) const + bool Selector_List::operator== (const Expression& rhs) const { // solve the double dispatch problem by using RTTI information via dynamic cast - if (List_Ptr_Const ls = Cast(&rhs)) { return *this == *ls; } + if (List_Ptr_Const ls = Cast(&rhs)) { return *ls == *this; } if (Selector_Ptr_Const ls = Cast(&rhs)) { return *this == *ls; } // compare invalid (maybe we should error?) return false;