Skip to content

Commit 9cec570

Browse files
authored
修复1.12.2打包器在用户输入非法时崩溃的问题 (#4094)
1 parent 38ce7c1 commit 9cec570

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Packer/Models/Providers/TermMappingProvider.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ internal static Dictionary<string, string> DeserializeFromLang(string content)
286286
// 基础条目
287287
var splitPosition = line.IndexOf('=');
288288

289+
// https://github.com/CFPAOrg/Minecraft-Mod-Language-Package/pull/3272/files#r1461545452
290+
if (splitPosition == -1) continue;
291+
289292
var key = line[..splitPosition];
290293
var value = splitPosition + 1 < line.Length
291294
? line[(splitPosition + 1)..]

0 commit comments

Comments
 (0)