Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/user32/listbox.c | 6 +++--- dlls/user32/tests/listbox.c | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index b5b7dc6..5746293 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -799,8 +799,8 @@ static LRESULT LISTBOX_GetText( LB_DESCR *descr, INT index, LPWSTR buffer, BOOL __ENDTRY } else { if (buffer) - *((LPDWORD)buffer)=*(LPDWORD)(&descr->items[index].data); - len = sizeof(DWORD); + *((ULONG_PTR *)buffer) = descr->items[index].data; + len = sizeof(ULONG_PTR); } return len; } @@ -2707,7 +2707,7 @@ LRESULT ListBoxWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam SetLastError(ERROR_INVALID_INDEX); return LB_ERR; } - if (!HAS_STRINGS(descr)) return sizeof(DWORD); + if (!HAS_STRINGS(descr)) return sizeof(ULONG_PTR); if (unicode) return strlenW( descr->items[wParam].str ); return WideCharToMultiByte( CP_ACP, 0, descr->items[wParam].str, strlenW(descr->items[wParam].str), NULL, 0, NULL, NULL ); diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index 813968f..658893a 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -2091,12 +2091,10 @@ static void test_LBS_NODATA(void) ret = SendMessageA(listbox, LB_SETITEMDATA, valid_idx[i], 42); ok(ret == TRUE, "Unexpected return value %d.\n", ret); ret = SendMessageA(listbox, LB_GETTEXTLEN, valid_idx[i], 0); - todo_wine_if(sizeof(void *) == 8) ok(ret == sizeof(data), "Unexpected return value %d.\n", ret);
memset(&data, 0xee, sizeof(data)); ret = SendMessageA(listbox, LB_GETTEXT, valid_idx[i], (LPARAM)&data); - todo_wine_if(sizeof(void *) == 8) ok(ret == sizeof(data), "Unexpected return value %d.\n", ret); todo_wine ok(!memcmp(&data, &zero_data, sizeof(data)), "Unexpected item data.\n");