From b995db627b173cc38abd6e102214041553eee665 Mon Sep 17 00:00:00 2001 From: pstef <3462925+pstef@users.noreply.github.com> Date: Sun, 23 Mar 2025 22:33:17 +0000 Subject: [PATCH] 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. --- runloop.c | 4 ++-- runloop.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runloop.c b/runloop.c index ad53bbdfd8..3d0ea1ce21 100644 --- a/runloop.c +++ b/runloop.c @@ -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; } diff --git a/runloop.h b/runloop.h index e8902f2446..40f104e28b 100644 --- a/runloop.h +++ b/runloop.h @@ -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);