Commit 9c0109c6 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Fix crash when a chat channel references an invalid chat action set

When there are no chat action sets or an action set has been deleted, bad
things would happen (e.g. segfault) when listing chat channels.
parent 63946042
Pipeline #3200 failed with stage
in 60 minutes and 5 seconds
...@@ -324,7 +324,7 @@ void chan_cfg() ...@@ -324,7 +324,7 @@ void chan_cfg()
sprintf(opt[k++],"%-27.27s%s","Channel Guru" sprintf(opt[k++],"%-27.27s%s","Channel Guru"
,cfg.chan[i]->guru<cfg.total_gurus ? cfg.guru[cfg.chan[i]->guru]->name : ""); ,cfg.chan[i]->guru<cfg.total_gurus ? cfg.guru[cfg.chan[i]->guru]->name : "");
sprintf(opt[k++],"%-27.27s%s","Channel Action Set" sprintf(opt[k++],"%-27.27s%s","Channel Action Set"
,cfg.actset[cfg.chan[i]->actset]->name); ,cfg.chan[i]->actset < cfg.total_actsets ? cfg.actset[cfg.chan[i]->actset]->name : "INVALID!");
opt[k][0]=0; opt[k][0]=0;
uifc.helpbuf= uifc.helpbuf=
"`Chat Channel Configuration:`\n" "`Chat Channel Configuration:`\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment