Alexandre Julliard : user32/tests: Don't release a random DC handle.

Alexandre Julliard julliard at winehq.org
Fri Oct 19 13:33:53 CDT 2012


Module: wine
Branch: master
Commit: 181e432e22b6231c0b461e52cb6a80b44562d1f2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=181e432e22b6231c0b461e52cb6a80b44562d1f2

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Oct 18 20:19:50 2012 +0200

user32/tests: Don't release a random DC handle.

---

 dlls/user32/tests/dce.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/tests/dce.c b/dlls/user32/tests/dce.c
index 1aa548e..f75e6b3 100644
--- a/dlls/user32/tests/dce.c
+++ b/dlls/user32/tests/dce.c
@@ -78,7 +78,7 @@ static void test_dc_attributes(void)
         old_hdc = hdcs[0];
         SetROP2( old_hdc, R2_WHITE );
     }
-    while (i >= 0) ReleaseDC( hwnd_cache, hdcs[--i] );
+    while (i > 0) ReleaseDC( hwnd_cache, hdcs[--i] );
 
     for (i = 0; i < 20; i++)
     {
@@ -91,7 +91,7 @@ static void test_dc_attributes(void)
         else
             ok( rop == def_rop, "wrong ROP2 %d after release %p/%p\n", rop, old_hdc, hdc );
     }
-    while (i >= 0) ReleaseDC( hwnd_cache, hdcs[--i] );
+    while (i > 0) ReleaseDC( hwnd_cache, hdcs[--i] );
 
     for (i = 0; i < 20; i++)
     {
@@ -107,7 +107,7 @@ static void test_dc_attributes(void)
         else
             ok( rop == def_rop, "wrong ROP2 %d after release %p/%p\n", rop, old_hdc, hdc );
     }
-    while (i >= 0) ReleaseDC( hwnd_cache, hdcs[--i] );
+    while (i > 0) ReleaseDC( hwnd_cache, hdcs[--i] );
 
     /* test own DC */
 




More information about the wine-cvs mailing list