diff options
Diffstat (limited to 'dw/stackingcontextmgr.cc')
-rw-r--r-- | dw/stackingcontextmgr.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dw/stackingcontextmgr.cc b/dw/stackingcontextmgr.cc index 9761e402..ac025534 100644 --- a/dw/stackingcontextmgr.cc +++ b/dw/stackingcontextmgr.cc @@ -68,8 +68,8 @@ void StackingContextMgr::addChildSCWidget (Widget *widget) pos = findZIndex (widget->getStyle()->zIndex, false); DBG_OBJ_MSGF ("common.scm", 1, "pos = %d", pos); - for (int i = numZIndices - 2; i >= pos; i--) { - zIndices[i] = zIndices[i + 1]; + for (int i = numZIndices - 1; i >= pos + 1; i--) { + zIndices[i] = zIndices[i - 1]; DBG_OBJ_ARRSET_NUM ("zIndex", i, zIndices[i]); } |