Browse Source

Never write code when you have only two working brain celles.

Godzil 3 years ago
parent
commit
6378769f2b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      source/display.c

+ 2 - 2
source/display.c

@@ -113,7 +113,7 @@ void drawPixel(uint32_t x, uint32_t y, uint32_t colour)
 void drawVLine(uint32_t x, uint32_t y0, uint32_t y1, uint32_t colour)
 {
     uint32_t i;
-    if (y0 > y1) { i = y0; y1 = y0; y0 = i; }
+    if (y0 > y1) { i = y1; y1 = y0; y0 = i; }
 
     if ((x < 0) || (x > windowWidth))
     {
@@ -134,7 +134,7 @@ void drawVLine(uint32_t x, uint32_t y0, uint32_t y1, uint32_t colour)
 void drawHLine(uint32_t x0, uint32_t y, uint32_t x1, uint32_t colour)
 {
     uint32_t i;
-    if (x0 > x1) { i = x0; x1 = x0; x0 = i; }
+    if (x0 > x1) { i = x1; x1 = x0; x0 = i; }
 
     if ((y < 0) || (y > windowHeight))
     {