The following change in SetWindowWord

+
+    WIN_ReleaseWndPtr(wndPtr);
+    switch(offset)
     {
-       case GWW_ID:        ptr = (WORD *)&wndPtr->wIDmenu; break;
-       case GWW_HINSTANCE: ptr = (WORD *)&wndPtr->hInstance; break;
-        case GWW_HWNDPARENT: retval = SetParent( hwnd, newval );
-                             goto end;
-       default:
-            WARN("Invalid offset %d\n", offset );
-            retval = 0;
-            goto end;
+    case GWL_ID:
+    case GWL_HINSTANCE:
+    case GWL_HWNDPARENT:
+        return SetWindowLongW( hwnd, offset, (UINT)newval );
+    default:
+        WARN("Invalid offset %d\n", offset );
+        return 0;
     }

creates an infinite loop as SetWindowLong calls WIN_SetWindowLong,
that calls SetWindowWord for the GWL_HINSTANCE case.

Gerard



Reply via email to