aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-03-31 17:09:16 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-03-31 17:09:16 +0000
commita67538178d58378d2e726aa928289ccfb73a8f80 (patch)
tree95883f743fb6de439e5792a930082a7bc7d15e30
parentf641d046fa8053a715fdfe70b570156ac4b6a953 (diff)
downloadmpd-a67538178d58378d2e726aa928289ccfb73a8f80.tar.gz
mpd-a67538178d58378d2e726aa928289ccfb73a8f80.tar.xz
mpd-a67538178d58378d2e726aa928289ccfb73a8f80.zip
fix for loading playlists on platforms where char is unsigned (like PPC)
git-svn-id: https://svn.musicpd.org/mpd/trunk@560 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--src/playlist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 2ca7cadcb..62482a9df 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1098,6 +1098,7 @@ int loadPlaylist(FILE * fp, char * utf8file) {
char * parent = parentPath(temp);
int parentlen = strlen(parent);
char * erroredFile = NULL;
+ int tempInt;
strcpy(rfile,temp);
strcat(rfile,".");
@@ -1120,7 +1121,8 @@ int loadPlaylist(FILE * fp, char * utf8file) {
return -1;
}
- while((s[slength] = fgetc(fileP))!=EOF) {
+ while((tempInt = fgetc(fileP))!=EOF) {
+ s[slength] = tempInt;
if(s[slength]=='\n' || s[slength]=='\0') {
s[slength] = '\0';
if(strncmp(s,musicDir,strlen(musicDir))==0) {