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

Fix observed crash when writing to hungup.log, node.aux was a large number

(greater than the number of configured externals) - I'm not sure why I was
using the value from the node.dab here, but it wasn't necessary so using local
variable now instead.
parent 7e8240c8
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2012 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -1760,10 +1760,8 @@ bool sbbs_t::exec_xtrn(uint xtrnnum)
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_APPEND);
return(false);
}
getnodedat(cfg.node_num,&thisnode,0);
now=time(NULL);
sprintf(str,hungupstr,useron.alias,thisnode.aux ? cfg.xtrn[thisnode.aux-1]->name : "External Program"
,timestr(now));
SAFEPRINTF3(str,hungupstr,useron.alias,cfg.xtrn[xtrnnum]->name,timestr(now));
write(file,str,strlen(str));
close(file);
}
......
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