Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 3a52592

Browse files
author
Aaron Leung
committed
dammit, forgot these two ... I guess we shouldn't be using magic numbers in the first place
1 parent 1e68428 commit 3a52592

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utf8_string.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace Sass {
6464
else {
6565
++i; // go to the next byte
6666
// see if it's still part of the sequence
67-
while ((i < str.length()) && ((static_cast<unsigned char>(str[i]) & 0b11000000) == 0b10000000)) {
67+
while ((i < str.length()) && ((static_cast<unsigned char>(str[i]) & 0xC0) == 0x80)) {
6868
++i;
6969
}
7070
// when it's not [aka a new leading byte], increment and move on
@@ -84,7 +84,7 @@ namespace Sass {
8484
++i; // go to the next byte
8585
++pos;
8686
// see if it's still part of the sequence
87-
while ((i < str.length()) && ((static_cast<unsigned char>(str[pos]) & 0b11000000) == 0b10000000)) {
87+
while ((i < str.length()) && ((static_cast<unsigned char>(str[pos]) & 0xC0) == 0x80)) {
8888
++i;
8989
++pos;
9090
}

0 commit comments

Comments
 (0)