Commit 64eed99f authored by Ian Schmidt's avatar Ian Schmidt Committed by Alexandre Julliard

Fixed an error and an off-by-one bug in DSA_SetItem(). This

eliminates some crashes with Win98 native SHELL32.
parent 8c726600
......@@ -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;
}
}
......
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