Skip to content

Commit

Permalink
Fix savestate auto-index detection
Browse files Browse the repository at this point in the history
Due to length confusion, state 0 would always be detected.
  • Loading branch information
zoltanvb committed Jan 6, 2025
1 parent 9c6e772 commit 071f86b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion command.c
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,8 @@ static void scan_states(settings_t *settings,
if (string_is_empty(dir_elem))
continue;

_len = fill_pathname_base(elem_base, dir_elem, sizeof(elem_base));
_len = strlen(dir_elem);
fill_pathname_base(elem_base, dir_elem, sizeof(elem_base));

/* Only consider files with a '.state' extension
* > i.e. Ignore '.state.auto', '.state.bak', etc. */
Expand Down

0 comments on commit 071f86b

Please sign in to comment.