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
This commit is contained in:
Warren Dukes 2004-03-31 17:09:16 +00:00
parent f641d046fa
commit a67538178d
1 changed files with 3 additions and 1 deletions

View File

@ -1098,6 +1098,7 @@ int loadPlaylist(FILE * fp, char * utf8file) {
char * parent = parentPath(temp); char * parent = parentPath(temp);
int parentlen = strlen(parent); int parentlen = strlen(parent);
char * erroredFile = NULL; char * erroredFile = NULL;
int tempInt;
strcpy(rfile,temp); strcpy(rfile,temp);
strcat(rfile,"."); strcat(rfile,".");
@ -1120,7 +1121,8 @@ int loadPlaylist(FILE * fp, char * utf8file) {
return -1; return -1;
} }
while((s[slength] = fgetc(fileP))!=EOF) { while((tempInt = fgetc(fileP))!=EOF) {
s[slength] = tempInt;
if(s[slength]=='\n' || s[slength]=='\0') { if(s[slength]=='\n' || s[slength]=='\0') {
s[slength] = '\0'; s[slength] = '\0';
if(strncmp(s,musicDir,strlen(musicDir))==0) { if(strncmp(s,musicDir,strlen(musicDir))==0) {