Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: make sorting of servers a bit more robust #16

Merged
merged 1 commit into from Nov 8, 2020

Conversation

TrueBrain
Copy link
Member

This fixes a few issues:

  • if a patchpack had a version > "1.10", it would show up on top
    of the list. This is solved by adding a "priority", where
    official servers get the highest priority, patchpacks the second,
    and everything else the lowest.
  • custom builds of JGRPP are like "jgrpp-0.38.1-39-g1234"; the
    old code tried to convert "1-39-g1234" to a number (and failed).
    This is now solved by only considering "0.38.1" as numeric values.
  • to avoid future issues, only consider "A.B.C" as "major.minor.patch"
    if all three are numeric.

This fixes a few issues:
- if a patchpack had a version > "1.10", it would show up on top
  of the list. This is solved by adding a "priority", where
  official servers get the highest priority, patchpacks the second,
  and everything else the lowest.
- custom builds of JGRPP are like "jgrpp-0.38.1-39-g1234"; the
  old code tried to convert "1-39-g1234" to a number (and failed).
  This is now solved by only considering "0.38.1" as numeric values.
- to avoid future issues, only consider "A.B.C" as "major.minor.patch"
  if all three are numeric.
@TrueBrain TrueBrain merged commit 18e881a into OpenTTD:master Nov 8, 2020
@TrueBrain TrueBrain deleted the jgrpp_version_bug branch November 8, 2020 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants