From 607bbb7e3a24c507381ead353ada73b238947571 Mon Sep 17 00:00:00 2001 From: dan Date: Thu, 8 Mar 2001 00:49:21 +0000 Subject: [PATCH] Fixed splitviews regarding index access (first element was never accesible) --- WINGs/wsplitview.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WINGs/wsplitview.c b/WINGs/wsplitview.c index ca3fe11b..a8a8d8c2 100644 --- a/WINGs/wsplitview.c +++ b/WINGs/wsplitview.c @@ -762,7 +762,7 @@ WMGetSplitViewSubviewAt(WMSplitView *sPtr, int index) { CHECK_CLASS(sPtr, WC_SplitView); - if (index > 0 && index < _GetSubviewsCount()) + if (index >= 0 && index < _GetSubviewsCount()) return (_GetSubviewAt(index)); else return (NULL); @@ -798,7 +798,7 @@ WMRemoveSplitViewSubviewAt(WMSplitView *sPtr, int index) CHECK_CLASS(sPtr, WC_SplitView); - if (index > 0 && index < _GetSubviewsCount()) { + if (index >= 0 && index < _GetSubviewsCount()) { p = _GetPSubviewStructAt(index); wfree(p); WMDeleteFromBag(sPtr->subviewsBag, index); -- 2.11.4.GIT