Fix dodgy code

This commit is contained in:
Andrew Pamment 2018-08-18 13:15:55 +10:00
parent 4cf5596737
commit 4fa7236270

View File

@ -1242,9 +1242,11 @@ bool HandleNetmail(struct MemMessage *mm)
if(mm->Flags & MMFLAG_TWIT) if(mm->Flags & MMFLAG_TWIT)
return(TRUE); return(TRUE);
if(config.cfg_Flags & CFG_STRIPRE) if(config.cfg_Flags & CFG_STRIPRE) {
strcpy(mm->Subject,StripRe(mm->Subject)); char *stripre = strdup(StripRe(mm->Subject));
strcpy(mm->Subject, stripre);
free(stripre);
}
/* Import empty netmail? */ /* Import empty netmail? */
istext=TRUE; istext=TRUE;
@ -1275,8 +1277,11 @@ bool HandleNetmail(struct MemMessage *mm)
{ {
toss_import++; toss_import++;
if(config.cfg_Flags & CFG_STRIPRE) if(config.cfg_Flags & CFG_STRIPRE) {
strcpy(mm->Subject,StripRe(mm->Subject)); char *stripre = strdup(StripRe(mm->Subject));
strcpy(mm->Subject, stripre);
free(stripre);
}
/* Remove LOCAL flag if set and set SENT flag */ /* Remove LOCAL flag if set and set SENT flag */