summaryrefslogtreecommitdiff
path: root/sw/Core/Src/gfx.h
diff options
context:
space:
mode:
authorAlex Evans <715855+mmalex@users.noreply.github.com>2024-11-07 15:54:15 +0000
committerAlex Evans <715855+mmalex@users.noreply.github.com>2024-11-07 15:54:15 +0000
commit3a86555a7211f15fa1cb55de3cc898a761a188fd (patch)
tree1aae31ea3044a2641c9c03338b073c48500a6f90 /sw/Core/Src/gfx.h
parentcc7afbbb54d2b66cc3a89f2748c85fc632634d1f (diff)
downloadplinky-3a86555a7211f15fa1cb55de3cc898a761a188fd.tar.gz
first baby steps at extending the webusb protocol to longer messages, processed faster, and add messages to read spi and wavetable ram
Diffstat (limited to 'sw/Core/Src/gfx.h')
-rwxr-xr-xsw/Core/Src/gfx.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/Core/Src/gfx.h b/sw/Core/Src/gfx.h
index d5a33ff..28feed5 100755
--- a/sw/Core/Src/gfx.h
+++ b/sw/Core/Src/gfx.h
@@ -71,7 +71,7 @@ void vline(int x1, int y1, int y2, int c) {
} else {
*dst |= b1 & mask;
dst += W;
- for (; --n; dst += W)
+ if (--n) for (; --n; dst += W)
*dst |= mask;
*dst |= b2 & mask;
}
@@ -81,7 +81,7 @@ void vline(int x1, int y1, int y2, int c) {
} else {
*dst &= ~b1;
dst += W;
- for (; --n; dst += W)
+ if (--n) for (; --n; dst += W)
*dst = 0;
*dst &= ~b2;
}