diff --git a/megamek/src/megamek/common/loaders/BLKInfantryFile.java b/megamek/src/megamek/common/loaders/BLKInfantryFile.java index e86cd98226f..f9f107c3372 100644 --- a/megamek/src/megamek/common/loaders/BLKInfantryFile.java +++ b/megamek/src/megamek/common/loaders/BLKInfantryFile.java @@ -71,7 +71,8 @@ public Entity getEntity() throws EntityLoadingException { } // get primary and secondary weapons - if (dataFile.exists("secondn")) { + // the check for "secondary" is for legacy infantry files that have a block but no actual secondary weapon + if (dataFile.exists("secondn") && dataFile.exists("Secondary")) { infantry.setSecondaryWeaponsPerSquad(dataFile.getDataAsInt("secondn")[0]); }