shell32: DragQueryFile doesn't count the null terminator.
This commit is contained in:
parent
1647de570b
commit
1d5575b905
|
@ -121,10 +121,8 @@ UINT16 WINAPI DragQueryFile16(
|
||||||
}
|
}
|
||||||
|
|
||||||
i = strlen(lpDrop);
|
i = strlen(lpDrop);
|
||||||
i++;
|
|
||||||
if (!lpszFile ) goto end; /* needed buffer size */
|
if (!lpszFile ) goto end; /* needed buffer size */
|
||||||
i = (wLength > i) ? i : wLength;
|
lstrcpynA (lpszFile, lpDrop, wLength);
|
||||||
lstrcpynA (lpszFile, lpDrop, i);
|
|
||||||
end:
|
end:
|
||||||
GlobalUnlock16(hDrop);
|
GlobalUnlock16(hDrop);
|
||||||
return i;
|
return i;
|
||||||
|
|
|
@ -621,10 +621,8 @@ UINT WINAPI DragQueryFileA(
|
||||||
}
|
}
|
||||||
|
|
||||||
i = strlen(lpDrop);
|
i = strlen(lpDrop);
|
||||||
i++;
|
|
||||||
if (!lpszFile ) goto end; /* needed buffer size */
|
if (!lpszFile ) goto end; /* needed buffer size */
|
||||||
i = (lLength > i) ? i : lLength;
|
lstrcpynA (lpszFile, lpDrop, lLength);
|
||||||
lstrcpynA (lpszFile, lpDrop, i);
|
|
||||||
end:
|
end:
|
||||||
GlobalUnlock(hDrop);
|
GlobalUnlock(hDrop);
|
||||||
return i;
|
return i;
|
||||||
|
@ -679,11 +677,8 @@ UINT WINAPI DragQueryFileW(
|
||||||
}
|
}
|
||||||
|
|
||||||
i = strlenW(lpwDrop);
|
i = strlenW(lpwDrop);
|
||||||
i++;
|
|
||||||
if ( !lpszwFile) goto end; /* needed buffer size */
|
if ( !lpszwFile) goto end; /* needed buffer size */
|
||||||
|
lstrcpynW (lpszwFile, lpwDrop, lLength);
|
||||||
i = (lLength > i) ? i : lLength;
|
|
||||||
lstrcpynW (lpszwFile, lpwDrop, i);
|
|
||||||
end:
|
end:
|
||||||
GlobalUnlock(hDrop);
|
GlobalUnlock(hDrop);
|
||||||
return i;
|
return i;
|
||||||
|
|
Loading…
Reference in New Issue