Skip to content

Commit 754885d

Browse files
committed
Remove new version suffix
1 parent a2190c1 commit 754885d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ModAssistant/Classes/Utils.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,11 @@ public static string GetVersion()
275275
var strlen = reader.ReadInt32();
276276
var strbytes = reader.ReadBytes(strlen);
277277

278-
return Encoding.UTF8.GetString(strbytes);
278+
var version = Encoding.UTF8.GetString(strbytes);
279+
280+
//There is one version ending in "p1" on BeatMods
281+
var filteredVersionMatch = Regex.Match(version, @"[\d]+.[\d]+.[\d]+(p1)?");
282+
return filteredVersionMatch.Success ? filteredVersionMatch.Value : version;
279283
}
280284
}
281285

0 commit comments

Comments
 (0)