fix: load worlds when there's no patch number

This commit is contained in:
CyberL1 2024-05-24 09:05:20 +02:00
parent 4804c582de
commit aef37f94c0

View File

@ -66,7 +66,7 @@ namespace Minecraft_Realms_Emulator.Modes.External
{
Slot activeSlot = world.Slots.Find(s => s.SlotId == world.ActiveSlot);
int versionsCompared = SemVersion.Parse(gameVersion, SemVersionStyles.Strict).ComparePrecedenceTo(SemVersion.Parse(activeSlot?.Version ?? gameVersion, SemVersionStyles.Strict));
int versionsCompared = SemVersion.Parse(gameVersion, SemVersionStyles.OptionalPatch).ComparePrecedenceTo(SemVersion.Parse(activeSlot?.Version ?? gameVersion, SemVersionStyles.Any));
string isCompatible = versionsCompared == 0 ? nameof(CompatibilityEnum.COMPATIBLE) : versionsCompared < 0 ? nameof(CompatibilityEnum.NEEDS_DOWNGRADE) : nameof(CompatibilityEnum.NEEDS_UPGRADE);
WorldResponse response = new()