callback(): filter out any state value that uses bits above 12

This commit is contained in:
Stefan Schippers 2023-09-27 18:35:40 +02:00
parent 0f29b53d25
commit e7c53b59b5
1 changed files with 2 additions and 1 deletions

View File

@ -1101,7 +1101,8 @@ int draw_xhair = tclgetboolvar("draw_crosshair");
xctx->semaphore++; /* to recognize recursive callback() calls */
c_snap = tclgetdoublevar("cadsnap");
state &=~Mod2Mask; /* 20170511 filter out NumLock status */
state &= ~Mod2Mask; /* 20170511 filter out NumLock status */
state &= (1 <<13) -1; /* filter out anything above bit 12 (4096) */
if(xctx->semaphore >= 2)
{
if(debug_var>=2)