On 10/16/2012 04:10, [email protected] wrote:
ScreenToClient should return zero if the operation fails, but is always
returning TRUE.  This patch corrects the problem and solves a crash bug
in Lord of the Rings Online (bug #31979)

Credit for this patch goes to some one else, as yet unidentified, since
it originally came from a closed forum for beta testers of the LoTRO
Riders of Rohan expansion and the forum has subsequently been wiped.
---
  dlls/user32/winpos.c |    3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 5a2f1f2..3855b19 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -250,8 +250,7 @@ BOOL WINAPI ClientToScreen( HWND hwnd, LPPOINT lppnt )
   */
  BOOL WINAPI ScreenToClient( HWND hwnd, LPPOINT lppnt )
  {
-    MapWindowPoints( 0, hwnd, lppnt, 1 );
-    return TRUE;
+    return MapWindowPoints( 0, hwnd, lppnt, 1 ) != 0;
  }
This needs a test.


Reply via email to