Properly copy text into user supplied buffer.

This commit is contained in:
Ulrich Czekalla 1999-10-23 16:54:48 +00:00 committed by Alexandre Julliard
parent f45608f639
commit 690a6d4b72
1 changed files with 4 additions and 4 deletions

View File

@ -3330,11 +3330,11 @@ static LRESULT LISTVIEW_GetItemA(HWND hwnd, LPLVITEMA lpLVItem)
{
Str_SetPtrA(&lpItem->pszText, dispInfo.item.pszText);
}
lpLVItem->pszText = dispInfo.item.pszText;
strncpy(lpLVItem->pszText, dispInfo.item.pszText, lpLVItem->cchTextMax);
}
else if (lpLVItem->mask & LVIF_TEXT)
{
lpLVItem->pszText = lpItem->pszText;
strncpy(lpLVItem->pszText, lpItem->pszText, lpLVItem->cchTextMax);
}
if (dispInfo.item.mask & LVIF_STATE)
@ -3425,11 +3425,11 @@ static LRESULT LISTVIEW_GetItemA(HWND hwnd, LPLVITEMA lpLVItem)
if (lpSubItem)
Str_SetPtrA(&lpSubItem->pszText, dispInfo.item.pszText);
}
lpLVItem->pszText = dispInfo.item.pszText;
strncpy(lpLVItem->pszText, dispInfo.item.pszText, lpLVItem->cchTextMax);
}
else if (lpLVItem->mask & LVIF_TEXT)
{
lpLVItem->pszText = lpSubItem->pszText;
strncpy(lpLVItem->pszText, lpSubItem->pszText, lpLVItem->cchTextMax);
}
}
}