From 7d6f31351dd95bcc31b5947bcbf281d4439ccd42 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 11 Apr 2015 19:34:38 -0400 Subject: [PATCH] Fixed the stupid 32-bit bug I did that fucking malloc pointer to struct instead of array of struct thing I always do again jesus fucking christ shit --- new/stack.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/new/stack.c b/new/stack.c index 488c25e..cb9aa6d 100644 --- a/new/stack.c +++ b/new/stack.c @@ -171,10 +171,6 @@ static void stackResize(uiControl *c, intmax_t x, intmax_t y, intmax_t width, in } uiControlPreferredSize(s->controls[i].c, d, &preferredWidth, &preferredHeight); if (s->vertical) { // all controls have same width - // TODO TODO TODO TODO TODO TODO TODO - // for some reason, the 32-bit Windows build is clobbering some stacks's data pointer with this line - // I have no idea what's going on; it doesn't happen with the 64-bit version - // is gcc miscompiling something? s->controls[i].width = width; s->controls[i].height = preferredHeight; stretchyht -= preferredHeight; @@ -356,7 +352,7 @@ void uiStackAdd(uiControl *st, uiControl *c, int stretchy) if (s->len >= s->cap) { s->cap += stackCapGrow; - s->controls = (stackControl *) uiRealloc(s->controls, s->cap * sizeof (stackControl *), "stackControl[]"); + s->controls = (stackControl *) uiRealloc(s->controls, s->cap * sizeof (stackControl), "stackControl[]"); } s->controls[s->len].c = c; s->controls[s->len].stretchy = stretchy;