Don't loose last band on insert.

This commit is contained in:
Vitaliy Margolen 2004-10-04 19:07:24 +00:00 committed by Alexandre Julliard
parent 3db9386195
commit 477aa4501b
1 changed files with 2 additions and 2 deletions

View File

@ -3131,9 +3131,9 @@ REBAR_InsertBandA (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
} }
/* post copy */ /* post copy */
if (uIndex < infoPtr->uNumBands - 1) { if (uIndex < infoPtr->uNumBands) {
memcpy (&infoPtr->bands[uIndex+1], &oldBands[uIndex], memcpy (&infoPtr->bands[uIndex+1], &oldBands[uIndex],
(infoPtr->uNumBands - uIndex - 1) * sizeof(REBAR_BAND)); (infoPtr->uNumBands - uIndex) * sizeof(REBAR_BAND));
} }
Free (oldBands); Free (oldBands);