Skip to content

Commit 4f18036

Browse files
committed
fix array out of index
1 parent dfc14df commit 4f18036

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

MacTcode.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@
712712
"@executable_path/../Frameworks",
713713
);
714714
MACOSX_DEPLOYMENT_TARGET = 11.0;
715-
MARKETING_VERSION = 0.13.2;
715+
MARKETING_VERSION = 0.13.3;
716716
ONLY_ACTIVE_ARCH = NO;
717717
PRODUCT_BUNDLE_IDENTIFIER = "jp.mad-p.inputmethod.MacTcode";
718718
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -749,7 +749,7 @@
749749
"@executable_path/../Frameworks",
750750
);
751751
MACOSX_DEPLOYMENT_TARGET = 11.0;
752-
MARKETING_VERSION = 0.13.2;
752+
MARKETING_VERSION = 0.13.3;
753753
PRODUCT_BUNDLE_IDENTIFIER = "jp.mad-p.inputmethod.MacTcode";
754754
PRODUCT_NAME = "$(TARGET_NAME)";
755755
SWIFT_EMIT_LOC_STRINGS = YES;

MacTcode/Mazegaki/MazegakiSelectionMode.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ class MazegakiSelectionMode: Mode, ModeWithCandidates {
9191
Log.i("MazegakiSelectionMode.candidates")
9292
let cands = hits[row].candidates()
9393
let candsWithKey = cands.enumerated().map { (index, element) in
94-
let key = UserConfigs.shared.ui.candidateSelectionKeys[index]
94+
let keys = UserConfigs.shared.ui.candidateSelectionKeys
95+
let key = (index < keys.count) ? keys[index] : ""
9596
return ("0" <= key && key <= "9") ? "\(key):\(element)" : element
9697
}
9798
Log.i("candsWithKey = \(candsWithKey)")

0 commit comments

Comments
 (0)