Fix FFXIV not launching when computer has been on for longer than ~24.9 days (pass the tick count to FFXIV as an unsigned int)#7
Open
Sophira wants to merge 1 commit into
Conversation
Author
|
One sec, going to force-push a correction to the commit description, sorry! [edit: Done! I had accidentally said |
8b1b54f to
fadb070
Compare
The result of GetTickCount is correctly assigned to an unsigned integer, but the use of %d rather than %u in the sprintf means that we're passing the signed number to ffxivgame.exe, not the unsigned number.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Please note: This pull request has not been tested as I do not have the correct build environment. However, the fix is a simple one.
I recently discovered that using Seventh Umbral Launcher to run FFXIV 1.x after a signed overflow of GetTickCount occurs (once the computer has been on for over ~24.9 days) results in the game failing to launch. This bug can be seen in action in this video, which includes a handy display on when the overflow happens: https://youtu.be/eaLcPSpQar4
At first I thought the problem was with the game itself, since I noticed that
ffxivgame.exewas able to be launched successfully, but after further investigation I think the issue is actually in the Seventh Umbral Launcher instead.Namely, when the launcher is calculating the parameters to use to launch the game with, the result of GetTickCount is correctly assigned to an unsigned integer, but the use of
%drather than%uin thesprintfcall directly afterwards means that we're passing the signed number to ffxivgame.exe, not the unsigned number.Although I haven't been able to test this, I'm all but certain that this change will fix this bug.