[PATCH] riched20: Adjusted shift by 8 bits to 16 bits (Coverity)

Marcus Meissner meissner at suse.de
Thu May 5 10:52:52 CDT 2011


Hi,

Shift should be 16bits instead of 8.
CID1451

Ciao, Marcus
---
 dlls/riched20/para.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c
index b6319e7..efd3d04 100644
--- a/dlls/riched20/para.c
+++ b/dlls/riched20/para.c
@@ -475,7 +475,7 @@ void ME_DumpParaStyleToBuf(const PARAFORMAT2 *pFmt, char buf[2048])
 
 /* we take for granted that PFE_xxx is the hiword of the corresponding PFM_xxx */
 #define DUMP_EFFECT(mask, name) \
-  p += sprintf(p, "%-22s%s\n", name, (pFmt->dwMask & (mask)) ? ((pFmt->wEffects & ((mask) >> 8)) ? "yes" : "no") : "N/A");
+  p += sprintf(p, "%-22s%s\n", name, (pFmt->dwMask & (mask)) ? ((pFmt->wEffects & ((mask) >> 16)) ? "yes" : "no") : "N/A");
 
   DUMP(PFM_NUMBERING,      "Numbering:",         "%u", wNumbering);
   DUMP_EFFECT(PFM_DONOTHYPHEN,     "Disable auto-hyphen:");
-- 
1.7.1



More information about the wine-patches mailing list