cleaner to use strpbrk
This commit is contained in:
parent
a49912c863
commit
f710129f32
|
@ -466,10 +466,8 @@ static bool playlist_read_file(
|
|||
/* Read playlist entry regardless
|
||||
* of Windows or Unix line endings
|
||||
*/
|
||||
if(last = strrchr(buf[i], '\r'))
|
||||
if((last = strpbrk(buf[i], "\n\r")))
|
||||
*last = '\0';
|
||||
else if(last = strrchr(buf[i], '\n'))
|
||||
*last = '\0';
|
||||
}
|
||||
|
||||
entry = &playlist->entries[playlist->size];
|
||||
|
|
Loading…
Reference in New Issue