diff options
-rw-r--r-- | apps/playlist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 6f6db27b2a..3bbe8b2f99 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -1660,9 +1660,9 @@ static int format_track_path(char *dest, char *src, int buf_length, int max, | |||
1660 | char *temp_ptr; | 1660 | char *temp_ptr; |
1661 | 1661 | ||
1662 | /* Zero-terminate the file name */ | 1662 | /* Zero-terminate the file name */ |
1663 | while((src[i] != '\n') && | 1663 | while((i < max) && |
1664 | (src[i] != '\r') && | 1664 | (src[i] != '\n') && |
1665 | (i < max)) | 1665 | (src[i] != '\r')) |
1666 | i++; | 1666 | i++; |
1667 | 1667 | ||
1668 | /* Now work back killing white space */ | 1668 | /* Now work back killing white space */ |