mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
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: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
adfb042819
commit
40f1c6693b
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
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;
|
SIZE_T sz;
|
||||||
|
|
||||||
buffer[0] = 0;
|
buffer[0] = 0;
|
||||||
if (addr &&
|
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;
|
LPSTR buff;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
Loading…
Reference in a new issue