# HG changeset patch # User peter1138 # Date 1135759183 0 # Node ID c70673b84010f9b93b3474f22f90bae9bf0650b9 # Parent a0643979398bdc285015ebb854a58bb960e77ab6 (svn r3349) Fix off-by-one error in drawing matrix widget, from r3181. diff -r a0643979398b -r c70673b84010 widget.c --- a/widget.c Tue Dec 27 22:55:24 2005 +0000 +++ b/widget.c Wed Dec 28 08:39:43 2005 +0000 @@ -232,13 +232,13 @@ color = _color_list[wi->color & 0xF].window_color_bgb; x = r.left; - for (ctr = c; ctr > 0; ctr--) { + for (ctr = c; ctr > 1; ctr--) { x += amt1; GfxFillRect(x, r.top + 1, x, r.bottom - 1, color); } x = r.top; - for (ctr = d; ctr > 0; ctr--) { + for (ctr = d; ctr > 1; ctr--) { x += amt2; GfxFillRect(r.left + 1, x, r.right - 1, x, color); } @@ -246,13 +246,13 @@ color = _color_list[wi->color&0xF].window_color_1b; x = r.left - 1; - for (ctr = c; ctr > 0; ctr--) { + for (ctr = c; ctr > 1; ctr--) { x += amt1; GfxFillRect(x, r.top + 1, x, r.bottom - 1, color); } x = r.top - 1; - for (ctr = d; ctr > 0; ctr--) { + for (ctr = d; ctr > 1; ctr--) { x += amt2; GfxFillRect(r.left+1, x, r.right-1, x, color); }