Skip to content
Snippets Groups Projects
Commit e2f82044 authored by rswindell's avatar rswindell
Browse files

Insure the WM_EMAIL mode flag is set when calling writemsg() from email()

- similar to what we do in netmail() with the WM_NETMAIL flag.
If you call writemsg() without WM_EMAIL set, it tries to use the subnum as an
index into the sub-board array and will crash.
parent 9c5fc4df
No related branches found
No related tags found
No related merge requests found
......@@ -121,7 +121,7 @@ bool sbbs_t::email(int usernumber, const char *top, const char *subj, long mode)
msg_tmp_fname(useron.xedit, msgpath, sizeof(msgpath));
username(&cfg,usernumber,str2);
if(!writemsg(msgpath,top, /* subj: */title,mode,INVALID_SUB,/* to: */str2,/* from: */useron.alias, &editor)) {
if(!writemsg(msgpath,top, /* subj: */title,WM_EMAIL|mode,INVALID_SUB,/* to: */str2,/* from: */useron.alias, &editor)) {
bputs(text[Aborted]);
return(false);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment