Skip to content

Commit ef72b90

Browse files
committed
Fix endless loop
1 parent d7ac57b commit ef72b90

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/var_stack.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,10 @@ namespace Sass {
467467
if (it != current->varIdxs.end()) {
468468
ExpressionObj& value = root.getVariable({
469469
current->frame, it->second });
470-
if (value.isNull()) continue;
471-
value = val;
472-
return;
470+
if (!value.isNull()) {
471+
value = val;
472+
return;
473+
}
473474
}
474475
if (current->transparent) {
475476
idx = idx - 1;
@@ -500,9 +501,10 @@ namespace Sass {
500501
if (it != current->varIdxs.end()) {
501502
ExpressionObj& value = root.getVariable({
502503
current->frame, it->second });
503-
if (value.isNull()) continue;
504-
value = val;
505-
return;
504+
if (!value.isNull()) {
505+
value = val;
506+
return;
507+
}
506508
}
507509
if (current->parent == std::string::npos) return;
508510
current = root.idxs[current->parent];

0 commit comments

Comments
 (0)