Fix savestate auto-index detection (#17351)

This commit is contained in:
zoltanvb 2025-01-06 11:45:00 +01:00 committed by GitHub
parent 9c6e772497
commit 5399faaa9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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. */