Closed DanSorrell closed 1 month ago
Taking out the -1
causes all kinds of problems for me when editing save names.
My initial, low effort, analysis started with me implementing the ISO date format in my local copy of the game’s code:
I then “fixed” the caret on my end by deleting the minus one. The real solution is to change the line to: FullCursorPos = CursorPos + (COUNT)utf8StringCount(dateStr);
Explanation:
Ah, there we go, I knew there had to be a more elegant solution.
Implemented in commit 4e12529
./src/uqm/gameopt.c
static BOOLEAN DrawSaveNameString (UNICODE *Str, COUNT CursorPos, COUNT state, COUNT gameIndex) {
Currently line 494 ...
Change this: FullCursorPos = CursorPos + (COUNT)strlen(dateStr) - 1;
To this: FullCursorPos = CursorPos + (COUNT)strlen(dateStr);