fix bug in prependCwdToPathDup()

git-svn-id: https://svn.musicpd.org/mpd/trunk@789 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes 2004-04-16 03:52:17 +00:00
parent 13f3794d09
commit fe52847ad6

View File

@ -283,14 +283,14 @@ char * prependCwdToPathDup(char * path) {
len = strlen(ret);
if(ret[len-1]!='/') {
strncat(ret,"/",MAXPATHLEN-len);
len = strlen(path);
len = strlen(ret);
}
strncat(ret,path,MAXPATHLEN-len);
len = strlen(ret);
}
if(ret[len-1]!='/') {
strncat(ret,"/",MAXPATHLEN-len);
len = strlen(path);
len = strlen(ret);
}
return realloc(ret,len+1);