diff --git a/src/blitter/common.hpp b/src/blitter/common.hpp index 0347aa8002..f1ea61c0ec 100644 --- a/src/blitter/common.hpp +++ b/src/blitter/common.hpp @@ -78,11 +78,11 @@ void Blitter::DrawLineGeneric(int x1, int y1, int x2, int y2, int screen_width, int frac_low = dy - frac_diff / 2; int frac_high = dy + frac_diff / 2; - while (frac_low < -(dx / 2)) { + while (frac_low < -dx) { frac_low += dx; y_low -= stepy; } - while (frac_high >= dx / 2) { + while (frac_high >= 0) { frac_high -= dx; y_high += stepy; } @@ -141,11 +141,11 @@ void Blitter::DrawLineGeneric(int x1, int y1, int x2, int y2, int screen_width, int frac_low = dx - frac_diff / 2; int frac_high = dx + frac_diff / 2; - while (frac_low < -(dy / 2)) { + while (frac_low < -dy) { frac_low += dy; x_low -= stepx; } - while (frac_high >= dy / 2) { + while (frac_high >= 0) { frac_high -= dy; x_high += stepx; }