demos: Fix operator precedence problem with window width
authorTony Barbour <tony@LunarG.com>
Wed, 10 Aug 2016 19:39:36 +0000 (13:39 -0600)
committerTony Barbour <tony@LunarG.com>
Wed, 10 Aug 2016 19:39:36 +0000 (13:39 -0600)
Change-Id: Ief0b260528a6eb38788f88ec8a463307522849e8

demos/cube.c

index a62a7e8..c6d7d79 100644 (file)
@@ -1993,7 +1993,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
         // with width=0 and height=0.
         if (wParam != SIZE_MINIMIZED) {
             demo.width = lParam & 0xffff;
-            demo.height = lParam & 0xffff0000 >> 16;
+            demo.height = (lParam & 0xffff0000) >> 16;
             demo_resize(&demo);
         }
         break;