Skip to content
Snippets Groups Projects
Commit 70918067 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't decrement user.xedit before calling uselect()

This bug would leave the user's external editor setting decremented by one if
they aborted (with Ctrl-C).

Fixes issue #631
parent 76c486fa
Branches
Tags
No related merge requests found
......@@ -2021,8 +2021,7 @@ bool sbbs_t::select_editor(void)
for(i=0;i<cfg.total_xedits;i++)
uselect(1,i,text[ExternalEditorHeading],cfg.xedit[i]->name,cfg.xedit[i]->ar);
if(useron.xedit) useron.xedit--;
if((i=uselect(0,useron.xedit,0,0,0))>=0) {
if((i=uselect(0,useron.xedit ? (useron.xedit-1):0,0,0,0))>=0) {
useron.xedit=i+1;
if(useron.number > 0)
putuserstr(useron.number, USER_XEDIT, cfg.xedit[i]->code);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment