Skip to content

Commit caf2751

Browse files
committed
[fix]: index lookup
1 parent 0bbd5c0 commit caf2751

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/ScriptToolkit/DataExtension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extension Data {
1212
var selfIndex = self.startIndex
1313
var dataIndex = data.startIndex
1414

15-
while selfIndex <= self.endIndex && dataIndex <= data.endIndex {
15+
while selfIndex < self.endIndex && dataIndex < data.endIndex {
1616
if dataIndex == data.endIndex {
1717
return selfIndex - data.count
1818
}

0 commit comments

Comments
 (0)