Fix: Rotate indices after saving playlist w/ first_index > 0

When saving the current playlist, entries written out
to disk were rotated, but its indices were not, resulting
in first_index being out of sync between the two. Thus,
an incorrect index was used for any playlist commands,
from the moment you saved the playlist until the next
time you resumed, which didn't produce the right playlist.

Change-Id: Ie4b02ce9e07e565b1b15c938cc4b820db08e8f1f
This commit is contained in:
Christian Soffke 2023-11-14 01:18:39 +01:00
parent bd93f9f96f
commit 5114827937
2 changed files with 35 additions and 7 deletions

View file

@ -330,7 +330,7 @@ static int wpsscrn(void* param)
}
else if ( global_status.resume_index != -1 )
{
DEBUGF("Resume index %X crc32 %lX offset %lX\n",
DEBUGF("Resume index %d crc32 %lX offset %lX\n",
global_status.resume_index,
(unsigned long)global_status.resume_crc32,
(unsigned long)global_status.resume_offset);