From 477aa4501bf1f87d4b4dd2cfe3ce271f3dffb0eb Mon Sep 17 00:00:00 2001 From: Vitaliy Margolen Date: Mon, 4 Oct 2004 19:07:24 +0000 Subject: [PATCH] Don't loose last band on insert. --- dlls/comctl32/rebar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c index d93cf59ad87..b1a386d52b6 100644 --- a/dlls/comctl32/rebar.c +++ b/dlls/comctl32/rebar.c @@ -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);