Commit 40f1c669 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winedbg: Use target pointer size in indirect string access.

We read it into a void* so we also need to zero initialize it in case the target pointer size is shorter than ours. Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent adfb0428
......@@ -268,12 +268,12 @@ BOOL memory_get_string(struct dbg_process* pcs, void* addr, BOOL in_debuggee,
BOOL memory_get_string_indirect(struct dbg_process* pcs, void* addr, BOOL unicode, WCHAR* buffer, int size)
{
void* ad;
void* ad = 0;
SIZE_T sz;
buffer[0] = 0;
if (addr &&
pcs->process_io->read(pcs->handle, addr, &ad, sizeof(ad), &sz) && sz == sizeof(ad) && ad)
pcs->process_io->read(pcs->handle, addr, &ad, pcs->be_cpu->pointer_size, &sz) && sz == pcs->be_cpu->pointer_size && ad)
{
LPSTR buff;
BOOL ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment