Alex Henrie : winedbg: Fix dependence on undefined left-shift behavior (scan-build).
Alexandre Julliard
julliard at winehq.org
Thu Sep 12 16:28:57 CDT 2019
Module: wine
Branch: master
Commit: 0566ba9a5881dc4f29e7b87bf5b5cd74fa304526
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0566ba9a5881dc4f29e7b87bf5b5cd74fa304526
Author: Alex Henrie <alexhenrie24 at gmail.com>
Date: Wed Sep 11 21:05:15 2019 -0600
winedbg: Fix dependence on undefined left-shift behavior (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
programs/winedbg/be_x86_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/winedbg/be_x86_64.c b/programs/winedbg/be_x86_64.c
index 136229fbd6..2346bc4d1f 100644
--- a/programs/winedbg/be_x86_64.c
+++ b/programs/winedbg/be_x86_64.c
@@ -640,7 +640,7 @@ static BOOL be_x86_64_fetch_integer(const struct dbg_lvalue* lvalue, unsigned si
if (!memory_read_value(lvalue, size, ret)) return FALSE;
/* propagate sign information */
- if (is_signed && size < 16 && (*ret >> (size * 8 - 1)) != 0)
+ if (is_signed && size < sizeof(*ret) && (*ret >> (size * 8 - 1)) != 0)
{
ULONGLONG neg = -1;
*ret |= neg << (size * 8);
More information about the wine-cvs
mailing list