mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
Fixed an error and an off-by-one bug in DSA_SetItem(). This
eliminates some crashes with Win98 native SHELL32.
This commit is contained in:
parent
8c7266009c
commit
64eed99f8e
1 changed files with 2 additions and 1 deletions
|
@ -659,7 +659,7 @@ DSA_SetItem (const HDSA hdsa, INT nIndex, LPVOID pSrc)
|
|||
/* within the old array */
|
||||
if (hdsa->nMaxCount > nIndex) {
|
||||
/* within the allocated space, set a new boundary */
|
||||
hdsa->nItemCount = nIndex;
|
||||
hdsa->nItemCount = nIndex + 1;
|
||||
}
|
||||
else {
|
||||
/* resize the block of memory */
|
||||
|
@ -672,6 +672,7 @@ DSA_SetItem (const HDSA hdsa, INT nIndex, LPVOID pSrc)
|
|||
return FALSE;
|
||||
|
||||
hdsa->nMaxCount = nNewItems;
|
||||
hdsa->nItemCount = nIndex + 1;
|
||||
hdsa->pData = lpTemp;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue