Skip to content

Commit cca92f6

Browse files
committed
Fix endless loop comparing Selector_List to List
1 parent 18f55b4 commit cca92f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ast.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,10 @@ namespace Sass {
448448
}
449449

450450
// Selector lists can be compared to comma lists
451-
bool Selector_List::operator==(const Expression& rhs) const
451+
bool Selector_List::operator== (const Expression& rhs) const
452452
{
453453
// solve the double dispatch problem by using RTTI information via dynamic cast
454-
if (List_Ptr_Const ls = Cast<List>(&rhs)) { return *this == *ls; }
454+
if (List_Ptr_Const ls = Cast<List>(&rhs)) { return *ls == *this; }
455455
if (Selector_Ptr_Const ls = Cast<Selector>(&rhs)) { return *this == *ls; }
456456
// compare invalid (maybe we should error?)
457457
return false;

0 commit comments

Comments
 (0)