Skip to content

Commit 4a2ab7b

Browse files
committed
addressing aaron's comment
1 parent d97d699 commit 4a2ab7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

functions.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,9 +714,11 @@ namespace Sass {
714714
// it's a multi bit sequence and presumably it's a leading bit
715715
else {
716716
++i; // go to the next byte
717+
c = static_cast<unsigned char>(str[i]);
717718
// see if it's still part of the sequence
718-
while (((str[i] & 0b11000000) == 0b10000000) && (i < length_of_s)) {
719+
while ((i < length_of_s) && ((c & 0b11000000) == 0b10000000)) {
719720
++i;
721+
c = static_cast<unsigned char>(str[i]);
720722
}
721723
// when it's not [aka a new leading bit], increment and move on
722724
++len;

0 commit comments

Comments
 (0)