gdi32: Avoid two cases of shift overflow in get_glyph_indices. get_glyph_indices.

Gerald Pfeifer gerald at pfeifer.com
Mon Sep 7 16:52:55 CDT 2015


---
 dlls/gdi32/tests/font.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index 3757a8d..6b0da1f 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -2391,12 +2391,12 @@ static BOOL get_glyph_indices(INT charset, UINT code_page, WORD *idx, UINT count
     if (charset == SYMBOL_CHARSET)
     {
         ok(strcmp("Arial", name), "face name should NOT be Arial\n");
-        ok(fs.fsCsb[0] & (1 << 31), "symbol encoding should be available\n");
+        ok(fs.fsCsb[0] & (1u << 31), "symbol encoding should be available\n");
     }
     else
     {
         ok(!strcmp("Arial", name), "face name should be Arial, not %s\n", name);
-        ok(!(fs.fsCsb[0] & (1 << 31)), "symbol encoding should NOT be available\n");
+        ok(!(fs.fsCsb[0] & (1u << 31)), "symbol encoding should NOT be available\n");
     }
 
     if (!TranslateCharsetInfo((DWORD *)(INT_PTR)cs, &csi, TCI_SRCCHARSET))
-- 
2.4.6



More information about the wine-patches mailing list