File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,10 @@ func readMapNamesFromMapFiles(
152152
153153 // Fill out the mapping, these maps won't be opened again:
154154 for foreignName , englishName := range foreignToEnglishMapping {
155+ // Skip empty names:
156+ if foreignName == "" || englishName == "" {
157+ continue
158+ }
155159 mainForeignToEnglishMapping [foreignName ] = englishName
156160 }
157161 }
Original file line number Diff line number Diff line change @@ -347,6 +347,14 @@ func ReadLocalizedDataFromMapGetForeignToEnglishMapping(
347347 // https://github.com/Kaszanas/SC2InfoExtractorGo/issues/67
348348 // Clean the foreign map name:
349349 mapName = cleanMapName (mapName )
350+ if mapName == "" || englishMapName == "" {
351+ log .WithFields (log.Fields {
352+ "mapFilepath" : mapFilepath ,
353+ "mapName" : mapName ,
354+ "englishMapName" : englishMapName ,
355+ }).Warn ("Empty map name, skipping" )
356+ continue
357+ }
350358
351359 foreignToEnglishMapName [mapName ] = englishMapName
352360 }
You can’t perform that action at this time.
0 commit comments