Commit 530913f0 authored by rswindell's avatar rswindell
Browse files

Bugfix: only accept Add/Delete/Copy/Paste if the proper WIN_ mode bits were

set in the call to uifc.list().
parent 0bbb5a7e
......@@ -278,12 +278,16 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
help();
break;
case 'A': /* Add/Insert */
if(!(mode&WIN_INS))
break;
if(!opts)
return(MSK_INS);
if(i>0 && i<=opts+1)
return((i-1)|MSK_INS);
return(which("Add before",opts+1)|MSK_INS);
case 'D': /* Delete */
if(!(mode&WIN_DEL))
break;
if(!opts)
break;
if(i>0 && i<=opts)
......@@ -292,6 +296,8 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
return(MSK_DEL);
return(which("Delete",opts)|MSK_DEL);
case 'C': /* Copy/Get */
if(!(mode&WIN_GET))
break;
if(!opts)
break;
if(i>0 && i<=opts)
......@@ -300,6 +306,8 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
return(MSK_GET);
return(which("Copy",opts)|MSK_GET);
case 'P': /* Paste/Put */
if(!(mode&WIN_PUT))
break;
if(!opts)
break;
if(i>0 && i<=opts)
......
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