diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-11 19:34:38 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-11 19:34:38 -0400 |
| commit | 7d6f31351dd95bcc31b5947bcbf281d4439ccd42 (patch) | |
| tree | 15adeea94cc0fec0f884cab4620c3f6843e703c3 /new/stack.c | |
| parent | c80335a5f4c5c8a406b71e02157dcafa76a2973c (diff) | |
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
Diffstat (limited to 'new/stack.c')
| -rw-r--r-- | new/stack.c | 6 |
1 files changed, 1 insertions, 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; |
