Ignore key name case when parsing a key file

This commit is contained in:
Alex Barney 2019-12-07 12:11:28 -06:00
parent ba2a923296
commit 0c4aad32a0

View file

@ -688,12 +688,12 @@ namespace LibHac
public static Dictionary<string, KeyValue> CreateCommonKeyDictionary() public static Dictionary<string, KeyValue> CreateCommonKeyDictionary()
{ {
return CreateCommonKeyList().ToDictionary(k => k.Name, k => k); return CreateCommonKeyList().ToDictionary(k => k.Name, k => k, StringComparer.OrdinalIgnoreCase);
} }
public static Dictionary<string, KeyValue> CreateUniqueKeyDictionary() public static Dictionary<string, KeyValue> CreateUniqueKeyDictionary()
{ {
return CreateUniqueKeyList().ToDictionary(k => k.Name, k => k); return CreateUniqueKeyList().ToDictionary(k => k.Name, k => k, StringComparer.OrdinalIgnoreCase);
} }
public static Dictionary<string, KeyValue> CreateFullKeyDictionary() public static Dictionary<string, KeyValue> CreateFullKeyDictionary()
@ -701,7 +701,7 @@ namespace LibHac
List<KeyValue> commonKeys = CreateCommonKeyList(); List<KeyValue> commonKeys = CreateCommonKeyList();
List<KeyValue> uniqueKeys = CreateUniqueKeyList(); List<KeyValue> uniqueKeys = CreateUniqueKeyList();
return uniqueKeys.Concat(commonKeys).ToDictionary(k => k.Name, k => k); return uniqueKeys.Concat(commonKeys).ToDictionary(k => k.Name, k => k, StringComparer.OrdinalIgnoreCase);
} }
private static List<KeyValue> CreateCommonKeyList() private static List<KeyValue> CreateCommonKeyList()