Commit 02d0f73e authored by Maks Naumov's avatar Maks Naumov

Fix selData.buttonWidth calculation

Operator "+" has a higher priority than "? :"
parent 7ef0ae90
...@@ -235,7 +235,7 @@ int rfbSelectBox(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font, ...@@ -235,7 +235,7 @@ int rfbSelectBox(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,
i = rfbWidthOfString(font,okStr); i = rfbWidthOfString(font,okStr);
j = rfbWidthOfString(font,cancelStr); j = rfbWidthOfString(font,cancelStr);
selData.buttonWidth= k = 4*border+(i<j)?j:i; selData.buttonWidth= k = 4*border+(i<j?j:i);
selData.okBX = x1+(x2-x1-2*k)/3; selData.okBX = x1+(x2-x1-2*k)/3;
if(selData.okBX<x1+border) /* too narrow! */ if(selData.okBX<x1+border) /* too narrow! */
return(-1); return(-1);
......
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