Skip to content

Commit

Permalink
Pass the tick count to FFXIV as an unsigned int
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Sophira committed Jan 31, 2022
1 parent eead5fe commit fadb070
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion launcher/Launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void CLauncher::Launch(const char* workingDirectory, const char* lobbyHostName,

char commandLine[1024];
uint32 currentTickCount = GetTickCount();
sprintf(commandLine, " T =%d /LANG =en-us /REGION =2 /SERVER_UTC =1356916742 /SESSION_ID =%s", currentTickCount, sessionId);
sprintf(commandLine, " T =%u /LANG =en-us /REGION =2 /SERVER_UTC =1356916742 /SESSION_ID =%s", currentTickCount, sessionId);

char encryptionKey[9];
sprintf(encryptionKey, "%0.8x", currentTickCount & ~0xFFFF);
Expand Down

0 comments on commit fadb070

Please sign in to comment.