Skip to content

Commit

Permalink
fix: str-slice can't start at 0
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni committed Jul 18, 2019
1 parent ac338df commit 1c2ae95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fn_strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ namespace Sass {
if (end_at > size) { end_at = (double)size; }
if (start_at < 0) {
start_at += size + 1;
if (start_at < 0) start_at = 0;
if (start_at <= 0) start_at = 1;
}
else if (start_at == 0) { ++ start_at; }

Expand Down

0 comments on commit 1c2ae95

Please sign in to comment.