(_ps_files_path_create) terminate string correctly and append the whole key instead of the rest key

This commit is contained in:
Sascha Schumann 1999-12-13 15:55:49 +00:00
parent 00e3bb678d
commit 75db7e91c6

View file

@ -105,8 +105,9 @@ static char *_ps_files_path_create(char *buf, size_t buflen, ps_files *data, con
buf[n++] = *p++;
buf[n++] = DIR_DELIMITER;
}
buf[n] = '\0';
strcat(buf, FILE_PREFIX);
strcat(buf, p);
strcat(buf, key);
return buf;
}