dbghelp/msc: Use the word size of the target process.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-07-31 11:17:39 -05:00 committed by Alexandre Julliard
parent b7defd2946
commit ca9b1d0077
1 changed files with 2 additions and 2 deletions

View File

@ -3089,10 +3089,10 @@ static BOOL pev_binop(struct pevaluator* pev, char op)
static BOOL pev_deref(struct pevaluator* pev)
{
char res[PEV_MAX_LEN];
DWORD_PTR v1, v2;
DWORD_PTR v1, v2 = 0;
if (!pev_pop_val(pev, &v1)) return FALSE;
if (!sw_read_mem(pev->csw, v1, &v2, sizeof(v2)))
if (!sw_read_mem(pev->csw, v1, &v2, pev->csw->cpu->word_size))
return PEV_ERROR1(pev, "deref: cannot read mem at %lx\n", v1);
snprintf(res, sizeof(res), "%ld", v2);
pev_push(pev, res);