POV-Ray : Newsgroups : povray.programming : Trivial bug in unix.cpp : Trivial bug in unix.cpp Server Time
5 Jul 2024 15:41:36 EDT (-0400)
  Trivial bug in unix.cpp  
From: Wolfgang Wieser
Date: 22 Nov 2003 16:51:26
Message: <3fbfda5e@news.povray.org>
In povray-3.50c's unix.cpp, function HandleXEvents(), there is 
some code which reads as follows (line 3382): 

-----------------------------------------------------------------------
  else if (theEvent->xkey.state | ControlMask && (theKeySym == XK_L ||
         theKeySym == XK_l || theKeySym == XK_R || theKeySym == XK_r))
  {
    refresh_y_min = 0;
    refresh_y_max = Frame.Screen_Height;
  }
-----------------------------------------------------------------------

This is a bug. It must be: 

-----------------------------------------------------------------------
  else if ((theEvent->xkey.state & ControlMask) && (theKeySym == XK_L ||
         theKeySym == XK_l || theKeySym == XK_R || theKeySym == XK_r))
  {
    refresh_y_min = 0;
    refresh_y_max = Frame.Screen_Height;
  }
-----------------------------------------------------------------------

Notice the '|' before ControlMask; put brackets around it for clarity. 

Please fix that in 3.51. 

Wolfgang


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.