Skip to content

Commit

Permalink
MTF file: case insensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
SJuliez committed Dec 23, 2023
1 parent 73a1179 commit 5530646
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions megamek/src/megamek/common/loaders/MtfFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class MtfFile implements IMechLoader {
{Mech.LOC_LT, Mech.LOC_RT, Mech.LOC_CT};

public static final String COMMENT = "#";
public static final String MTF_VERSION = "Version:";
public static final String MTF_VERSION = "version:";
public static final String GENERATOR = "generator:";
public static final String CHASSIS = "chassis:";
public static final String MODEL = "model:";
Expand Down Expand Up @@ -512,7 +512,7 @@ private void readLines(BufferedReader r) throws IOException {
continue;
}

if (line.startsWith(MTF_VERSION)) {
if (line.toLowerCase().startsWith(MTF_VERSION)) {
// Reading the version, chassis and model as the first three lines without header is kept
// for backward compatibility for user-generated units. However the version is no longer checked
// for correct values as that makes no difference so long as the unit can be loaded
Expand Down

0 comments on commit 5530646

Please sign in to comment.