Skip to content

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
jpd002:masterfrom
Sophira:fix-gettickcount-sprintf
Open

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
Sophira wants to merge 1 commit into
jpd002:masterfrom
Sophira:fix-gettickcount-sprintf

Conversation

@Sophira

@Sophira Sophira commented Jan 31, 2022

Copy link
Copy Markdown

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

Sophira commented Jan 31, 2022

Copy link
Copy Markdown
Author

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.]

@Sophira Sophira force-pushed the fix-gettickcount-sprintf branch from 8b1b54f to fadb070 Compare January 31, 2022 14:49
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