Prevent exceeding array bounds in X11 key-repeat detection
[freeglut] / src / freeglut_state.c
index 7b7eedc..f4072dc 100644 (file)
@@ -386,7 +386,7 @@ int FGAPIENTRY glutGet( GLenum eWhat )
           winRect.top    += GetSystemMetrics( SM_CYSIZEFRAME ) + GetSystemMetrics( SM_CYCAPTION );
           winRect.bottom -= GetSystemMetrics( SM_CYSIZEFRAME );
         }
-#endif //TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
 
         switch( eWhat )
         {
@@ -400,32 +400,32 @@ int FGAPIENTRY glutGet( GLenum eWhat )
 
     case GLUT_WINDOW_BORDER_WIDTH :
 #if TARGET_HOST_WINCE
-               return 0;
+        return 0;
 #else
         return GetSystemMetrics( SM_CXSIZEFRAME );
-#endif //TARGET_HOST_WINCE
+#endif /* !TARGET_HOST_WINCE */
 
     case GLUT_WINDOW_HEADER_HEIGHT :
 #if TARGET_HOST_WINCE
-               return 0;
+        return 0;
 #else
         return GetSystemMetrics( SM_CYCAPTION );
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
 
     case GLUT_DISPLAY_MODE_POSSIBLE:
 #if TARGET_HOST_WINCE
-               return GL_FALSE;
+        return GL_FALSE;
 #else
         return fgSetupPixelFormat( fgStructure.Window, GL_TRUE,
                                     PFD_MAIN_PLANE );
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
 
 
     case GLUT_WINDOW_FORMAT_ID:
 #if !TARGET_HOST_WINCE
         if( fgStructure.Window != NULL )
             return GetPixelFormat( fgStructure.Window->Window.Device );
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
         return 0;
 
 #endif
@@ -535,10 +535,10 @@ int FGAPIENTRY glutDeviceGet( GLenum eWhat )
          * We are much more fortunate under Win32 about this...
          */
 #if TARGET_HOST_WINCE
-               return 1;
+        return 1;
 #else
         return GetSystemMetrics( SM_CMOUSEBUTTONS );
-#endif //TARGET_HOST_WINCE
+#endif /* TARGET_HOST_WINCE */
 
 #endif