On Sun, 24 Mar 2002 23:36, Friedrich Lobenstock wrote:
> const char *level5_homedir(const char *mailspool, const char *username) {
>
> static char *res=NULL;
> int i, j=strlen(mailspool);
>
> if (res) free (res);
> res = (char *)malloc (j + 10 + 1);
> strcpy (res, mailspool);
> for (i=0; i<5 && i<strlen(username); i++) {
> res[j+2*i]=username[i];
> res[j+2*i+1]='/';
Should be the other way round:
res[j+2*i]='/';
res[j+2*i+1]=username[i];
> }
> res[j+2*i]='\0';
> return res;
> }
--
MfG / Regards
Friedrich Lobenstock