changeset 2801:cdd68c8c4bb5 draft

(svn r3349) Fix off-by-one error in drawing matrix widget, from r3181.
author peter1138 <peter1138@openttd.org>
date Wed, 28 Dec 2005 08:39:43 +0000
parents 5eabcc837cba
children 4bf71bb7f0d4
files widget.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/widget.c
+++ b/widget.c
@@ -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);
 			}