Fix game crashing on leap day (Feb 29th) #1814
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since 0.4.8, the
startingDate
has been hardcoded to use the same date as real-life but with the year changed to 2019.liliths-throne-public/src/com/lilithsthrone/game/Game.java
Lines 417 to 422 in ed687f3
Because 2019 is not a leap year, this can cause issue when launching the game on a leap day (February 29th).
This patch fixed this issue by changing the year to 2020, which IS a leap year.
This issue can alternatively be fixed by changing Feb 29 to Feb 28 if (for story-telling or whatever reason) the year being 2019 is absolutely required.
Or the real-life year can just be used instead.