From: ewt Date: Fri, 12 Sep 1997 15:49:37 +0000 (+0000) Subject: should handle empty fields now X-Git-Tag: r0-12~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c2700350af62eab4c11d36826e1aa6476c5b0d8;p=thirdparty%2Fnewt.git should handle empty fields now --- diff --git a/grid.c b/grid.c index d5e654c..96541a5 100644 --- a/grid.c +++ b/grid.c @@ -100,9 +100,10 @@ static void shuffleGrid(newtGrid grid, int left, int top, int set) { if (field->u.grid->width == -1) shuffleGrid(field->u.grid, left, top, 0); j = field->u.grid->width; - } else { + } else if (field->type == NEWT_GRID_COMPONENT){ j = field->u.co->width; - } + } else + j = 0; j += field->padLeft + field->padRight; @@ -123,9 +124,10 @@ static void shuffleGrid(newtGrid grid, int left, int top, int set) { if (field->u.grid->height == -1) shuffleGrid(field->u.grid, 0, 0, 0); j = field->u.grid->height; - } else { + } else if (field->type == NEWT_GRID_COMPONENT){ j = field->u.co->height; - } + } else + j = 0; j += field->padTop + field->padBottom;