Commit 1d5575b9 authored by Damjan Jovanovic's avatar Damjan Jovanovic Committed by Alexandre Julliard

shell32: DragQueryFile doesn't count the null terminator.

parent 1647de57
......@@ -121,10 +121,8 @@ UINT16 WINAPI DragQueryFile16(
}
i = strlen(lpDrop);
i++;
if (!lpszFile ) goto end; /* needed buffer size */
i = (wLength > i) ? i : wLength;
lstrcpynA (lpszFile, lpDrop, i);
lstrcpynA (lpszFile, lpDrop, wLength);
end:
GlobalUnlock16(hDrop);
return i;
......
......@@ -621,10 +621,8 @@ UINT WINAPI DragQueryFileA(
}
i = strlen(lpDrop);
i++;
if (!lpszFile ) goto end; /* needed buffer size */
i = (lLength > i) ? i : lLength;
lstrcpynA (lpszFile, lpDrop, i);
lstrcpynA (lpszFile, lpDrop, lLength);
end:
GlobalUnlock(hDrop);
return i;
......@@ -679,11 +677,8 @@ UINT WINAPI DragQueryFileW(
}
i = strlenW(lpwDrop);
i++;
if ( !lpszwFile) goto end; /* needed buffer size */
i = (lLength > i) ? i : lLength;
lstrcpynW (lpszwFile, lpwDrop, i);
lstrcpynW (lpszwFile, lpwDrop, lLength);
end:
GlobalUnlock(hDrop);
return i;
......
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