Change the type of slot to int

Everywhere around this function it is an int, and within this function
there is also a check for sign, which makes me think unsigned was a
mistake.
This commit is contained in:
pstef 2025-03-23 22:33:17 +00:00
parent 99af19b6fe
commit b995db627b
2 changed files with 3 additions and 3 deletions

View file

@ -7320,7 +7320,7 @@ bool runloop_get_savestate_path(char *s, size_t len, int state_slot)
return true;
}
bool runloop_get_replay_path(char *s, size_t len, unsigned slot)
bool runloop_get_replay_path(char *s, size_t len, int slot)
{
size_t _len;
runloop_state_t *runloop_st = &runloop_state;
@ -7335,7 +7335,7 @@ bool runloop_get_replay_path(char *s, size_t len, unsigned slot)
_len = strlcpy(s, name_replay, len);
if (slot >= 0)
snprintf(s + _len, len - _len, "%d", slot);
snprintf(s + _len, len - _len, "%d", slot);
return true;
}

View file

@ -431,7 +431,7 @@ bool runloop_get_current_savestate_path(char *path, size_t len);
bool runloop_get_savestate_path(char *path, size_t len, int slot);
bool runloop_get_replay_path(char *path, size_t len, unsigned slot);
bool runloop_get_replay_path(char *path, size_t len, int slot);
void runloop_state_free(runloop_state_t *runloop_st);