It appears that strtok() returns a temporary string which loses its correct value after several calls. The manual at https://manual.zorro-project.com/str_.htm points this out for other functions, but not for strtok(). Unless I am mistaken here, would you mind updating the manual?