Commit 477aa450 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

Don't loose last band on insert.

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