Commit f88fecf8 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

shell32: Returns a number of copied bytes in DropQueryFileA.

parent 205f952d
...@@ -583,10 +583,10 @@ UINT WINAPI DragQueryFileA(HDROP hDrop, UINT lFile, LPSTR lpszFile, UINT lLength ...@@ -583,10 +583,10 @@ UINT WINAPI DragQueryFileA(HDROP hDrop, UINT lFile, LPSTR lpszFile, UINT lLength
} }
filename = malloc(i); filename = malloc(i);
if (!filename) goto error; if (!filename) goto error;
WideCharToMultiByte(CP_ACP, 0, filenameW, -1, filename, i, NULL, NULL); i = WideCharToMultiByte(CP_ACP, 0, filenameW, -1, filename, i, NULL, NULL);
i = strlen(filename);
lstrcpynA(lpszFile, filename, lLength); lstrcpynA(lpszFile, filename, lLength);
i = min(i, lLength) - 1;
end: end:
free(filenameW); free(filenameW);
free(filename); free(filename);
......
...@@ -796,7 +796,7 @@ static LRESULT WINAPI drop_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA ...@@ -796,7 +796,7 @@ static LRESULT WINAPI drop_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA
memset(filename, 0xaa, sizeof(filename)); memset(filename, 0xaa, sizeof(filename));
num = DragQueryFileA(hDrop, 0, filename, 2); num = DragQueryFileA(hDrop, 0, filename, 2);
todo_wine ok(num == 1, "expected 1, got %u\n", num); ok(num == 1, "expected 1, got %u\n", num);
ok(filename[0] == expected_filename[0], "expected '%c', got '%c'\n", ok(filename[0] == expected_filename[0], "expected '%c', got '%c'\n",
expected_filename[0], filename[0]); expected_filename[0], filename[0]);
ok(filename[1] == '\0', "expected nul, got %#x\n", (BYTE)filename[1]); ok(filename[1] == '\0', "expected nul, got %#x\n", (BYTE)filename[1]);
......
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