Skip to content

Commit b7696e1

Browse files
authored
Update D2Loader.ps1
fixed update version sorting
1 parent 3d26bd4 commit b7696e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

D2Loader.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Changes since 1.11.0 (next version edits):
2222
Added config for ForceAuthTokenForRegion. You can now specify regions to use auth tokens (in case one regions auth goes down).
2323
Fixed Region display issues on main menu when multiple regions are open.
2424
Fixed DClone info from Diablo2.io displaying incorrectly.
25+
Fixed update checker not sorting versions correctly.
2526
Replaced D2rapi.fly.dev with d2emu.com for dclone tracking.
2627
Many tidy ups to align with better coding practices.
2728
Removed unused variables.
@@ -243,7 +244,7 @@ if ($CurrentStats.LastUpdateCheck -lt (Get-Date).addHours(-8).ToString('yyyy.MM.
243244
if ($Script:LatestVersion -gt $Script:CurrentVersion) {
244245
Write-Host
245246
Write-Host " Update available! See Github for latest version and info" -foregroundcolor Yellow -nonewline
246-
if ([version[]]$CurrentVersion -in ($Releases.Name.Trim('v') | Sort-Object -desc)[2..$releases.count]){
247+
if ([version]$CurrentVersion -in (($Releases.name.Trim('v') | ForEach-Object { [version]$_ } | Sort-Object -desc)[2..$releases.count])){
247248
Write-Host ".`n There have been several releases since your version." -foregroundcolor Yellow
248249
Write-Host " Checkout Github releases for fixes/features added. " -foregroundcolor Yellow
249250
Write-Host " $X[38;2;69;155;245;4mhttps://github.com/shupershuff/Diablo2RLoader/releases/$X[0m"

0 commit comments

Comments
 (0)