summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-05-05 20:20:52 +0000
committerfrosch <frosch@openttd.org>2011-05-05 20:20:52 +0000
commitf976cddcbac02d2e58a92990e59ffe621e035890 (patch)
tree84cfd19814521ef3b015d704c62aed70e0787352
parent1e8f2cd7e92cd6a19969874a6241bf2790c3785b (diff)
downloadopenttd-f976cddcbac02d2e58a92990e59ffe621e035890.tar.xz
(svn r22426) -Fix (r22291): Drawing vertical and horizontal lines of width 1 missed drawing the first pixel.
-rw-r--r--src/blitter/base.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blitter/base.cpp b/src/blitter/base.cpp
index 1e6afdad5..cbaea29f9 100644
--- a/src/blitter/base.cpp
+++ b/src/blitter/base.cpp
@@ -63,7 +63,7 @@ void Blitter::DrawLine(void *video, int x, int y, int x2, int y2, int screen_wid
frac_low += dx;
y_low -= stepy;
}
- while (frac_high - dx / 2 > 0) {
+ while (frac_high - dx / 2 >= 0) {
frac_high -= dx;
y_high += stepy;
}
@@ -97,7 +97,7 @@ void Blitter::DrawLine(void *video, int x, int y, int x2, int y2, int screen_wid
frac_low += dy;
x_low -= stepx;
}
- while (frac_high - dy / 2 > 0) {
+ while (frac_high - dy / 2 >= 0) {
frac_high -= dy;
x_high += stepx;
}