From 789f67800622640032b9df2111eb8e78a63fed1d Mon Sep 17 00:00:00 2001 From: arif Date: Mon, 7 Apr 2008 21:37:05 +0000 Subject: [PATCH] *** empty log message *** --- lib/glcomp/glcompset.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/glcomp/glcompset.c b/lib/glcomp/glcompset.c index fc17e79a8..cb501453e 100644 --- a/lib/glcomp/glcompset.c +++ b/lib/glcomp/glcompset.c @@ -129,10 +129,10 @@ int glCompSetRemovePanel(glCompSet * s, glCompPanel * p) { int ind = 0; int found = 0; - for (ind; ind < s->panelcount - 1; ind++) { + for (ind; ind < s->panelcount; ind++) { if ((s->panels[ind] == p) && found == 0) found = 1; - if (found == 1) + if ((found == 1)&&(ind <(s->panelcount-1))) s->panels[ind] = s->panels[ind + 1]; } if (found) { @@ -316,10 +316,10 @@ int glCompSetRemoveButton(glCompSet * s, glCompButton * p) { int ind = 0; int found = 0; - for (ind; ind < s->buttoncount - 1; ind++) { + for (ind; ind < s->buttoncount ; ind++) { if ((s->buttons[ind] == p) && found == 0) found = 1; - if (found == 1) + if ((found == 1) &&(ind <= (s->buttoncount-1))) s->buttons[ind] = s->buttons[ind + 1]; } if (found) { @@ -530,6 +530,7 @@ int glCompSetRelease(glCompSet * s, int x, int y) if ((glCompPointInButton (s->buttons[ind], s->clickedX, s->clickedY))) { glCompButtonClick(s->buttons[ind]); + break; } } } -- 2.40.0