Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/user32/listbox.c | 3 ++- dlls/user32/tests/listbox.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 5746293..044d73d 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -799,7 +799,8 @@ static LRESULT LISTBOX_GetText( LB_DESCR *descr, INT index, LPWSTR buffer, BOOL __ENDTRY } else { if (buffer) - *((ULONG_PTR *)buffer) = descr->items[index].data; + *((ULONG_PTR *)buffer) = (descr->style & LBS_NODATA) + ? 0 : descr->items[index].data; len = sizeof(ULONG_PTR); } return len; diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index 658893a..3c3de71 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -2096,7 +2096,6 @@ static void test_LBS_NODATA(void) memset(&data, 0xee, sizeof(data)); ret = SendMessageA(listbox, LB_GETTEXT, valid_idx[i], (LPARAM)&data); ok(ret == sizeof(data), "Unexpected return value %d.\n", ret); - todo_wine ok(!memcmp(&data, &zero_data, sizeof(data)), "Unexpected item data.\n");
ret = SendMessageA(listbox, LB_GETITEMDATA, valid_idx[i], 0);