mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-24 22:33:52 +03:00
Guard against out of bounds
This commit is contained in:
parent
038b593881
commit
43a52e1d29
@ -149,8 +149,8 @@ final class Typesetter {
|
||||
return runs.flatMap { $0 }
|
||||
}
|
||||
|
||||
private let logger = OSLog(subsystem: Defs.loggerSubsystem,
|
||||
category: Defs.LoggerCategory.view)
|
||||
private let log = OSLog(subsystem: Defs.loggerSubsystem,
|
||||
category: Defs.LoggerCategory.view)
|
||||
|
||||
private func ctRuns(
|
||||
from utf16Chars: Array<Unicode.UTF16.CodeUnit>,
|
||||
|
@ -116,6 +116,7 @@
|
||||
4B64239A1D8EFE3000FC78C8 /* WorkspaceTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B6423991D8EFE3000FC78C8 /* WorkspaceTool.swift */; };
|
||||
4B6A70941D60E04200E12030 /* AppKitCommons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B6A70931D60E04200E12030 /* AppKitCommons.swift */; };
|
||||
4B6A70961D6100E300E12030 /* SwiftCommons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B6A70951D6100E300E12030 /* SwiftCommons.swift */; };
|
||||
4B6DFB3A22366D140066BB43 /* OSLogCommons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BE867BD8F0ED0246CC94 /* OSLogCommons.swift */; };
|
||||
4B9433DC20B95EC6005807BA /* MacVim-bsh.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4B9433A120B95EC1005807BA /* MacVim-bsh.icns */; };
|
||||
4B9433DD20B95EC6005807BA /* MacVim-generic.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4B9433A220B95EC1005807BA /* MacVim-generic.icns */; };
|
||||
4B9433DE20B95EC6005807BA /* MacVim-dylan.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4B9433A320B95EC1005807BA /* MacVim-dylan.icns */; };
|
||||
@ -1211,6 +1212,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4B6DFB3A22366D140066BB43 /* OSLogCommons.swift in Sources */,
|
||||
4B96FB3B1EBBC56F00E4E164 /* FileItemIgnorePattern.swift in Sources */,
|
||||
4B96FB3C1EBBC56F00E4E164 /* FileUtils.swift in Sources */,
|
||||
4B96FB3D1EBBC56F00E4E164 /* Matcher.swift in Sources */,
|
||||
|
@ -74,6 +74,10 @@ class Matcher {
|
||||
if pchars[pidx] == tchar {
|
||||
result += 1
|
||||
pidx = pchars.index(after: pidx)
|
||||
|
||||
if pidx == pchars.endIndex {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user