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 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
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sophira
Copy link

@Sophira Sophira commented Jan 31, 2022

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.exe was 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 %d rather than %u in the sprintf call 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.

@Sophira
Copy link
Author

Sophira commented Jan 31, 2022

One sec, going to force-push a correction to the commit description, sorry!

[edit: Done! I had accidentally said %s instead of %d in there.]

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.
@Sophira Sophira changed the title Pass the tick count to FFXIV as an unsigned int 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) Jan 30, 2024
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.

1 participant