mirror of
https://github.com/packwiz/packwiz.git
synced 2025-11-18 17:14:32 +01:00
Fix minecraft version 1.21.1 pulling in NeoForge versions for 1.21.10 (#370)
Since the compatibility check only verified that the first characters matched between the version strings, a one-character patch version could be misinterpreted if a two-character patch version existed.
This commit is contained in:
@@ -177,7 +177,11 @@ func FetchMavenWithNeoForgeStyleVersions(url string, friendlyName string) func(m
|
|||||||
if len(mcSplit) > 2 {
|
if len(mcSplit) > 2 {
|
||||||
mcMinor = mcSplit[2]
|
mcMinor = mcSplit[2]
|
||||||
}
|
}
|
||||||
return strings.HasPrefix(neoforgeVersion, mcMajor+"."+mcMinor)
|
|
||||||
|
// We can only accept an exact version number match, because otherwise 1.21.1 would pull in loader versions for 1.21.10.
|
||||||
|
var requiredPrefix = mcMajor + "." + mcMinor + "."
|
||||||
|
|
||||||
|
return strings.HasPrefix(neoforgeVersion, requiredPrefix)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user