Skip to content

Commit 32ceedc

Browse files
committed
Fix endless loop in join_paths (fixes #2106)
1 parent 38fd793 commit 32ceedc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/file.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ namespace Sass {
196196
bool is_slash = pos + 2 == L && (l[pos+1] == '/' || l[pos+1] == '\\');
197197
bool is_self = pos + 3 == L && (l[pos+1] == '.');
198198
if (!is_self && !is_slash) r = r.substr(3);
199+
else if (pos == std::string::npos) break;
199200
l = l.substr(0, pos == std::string::npos ? pos : pos + 1);
200201
}
201202

0 commit comments

Comments
 (0)