The command "jmp 100" did not work as expected (switch to the next
file) but caused the following error
repos failed: Invalid argument
The problem was that ->start_chunk was set to pt->num_chunks which
exceeds the maximal valid chunk number by one.
This commit special cases the value 100 to make "jmp 100" equivalent to
"next".
return ret;
if (percent < 0 || percent > 100)
return -ERRNO_TO_PARA_ERROR(EINVAL);
+ if (percent == 100)
+ return com_next(pt, 1, (char *[]){"next", NULL});
if (pt->playing && !pt->fn.btrn)
return 0;
pt->start_chunk = percent * pt->num_chunks / 100;