[stdlib] String: Ensure indices are marked scalar aligned before rounding down to Character

This commit is contained in:
Karoy Lorentey
2022-03-22 14:27:35 -07:00
parent 5a22ceb72b
commit 2464aa681e
2 changed files with 2 additions and 2 deletions

View File

@@ -204,7 +204,7 @@ extension Substring {
else {
return false
}
return i == _roundDownToNearestCharacter(i)
return i == _roundDownToNearestCharacter(i._scalarAligned)
}
}