From 52178a0ec57797e9669b91080b562cb2f4112e4b Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Thu, 11 Sep 2014 06:41:30 +0000 Subject: [PATCH] o Fix off-by-one for canvas size. --- demo-main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo-main.cc b/demo-main.cc index 96af36b..23d698e 100644 --- a/demo-main.cc +++ b/demo-main.cc @@ -47,7 +47,7 @@ public: virtual int height() const { return 64; } virtual void SetPixel(int x, int y, uint8_t red, uint8_t green, uint8_t blue) { - if (x < 0 || x > width() || y < 0 || y > height()) return; + if (x < 0 || x >= width() || y < 0 || y >= height()) return; // We have up to column 64 one direction, then folding around. Lets map if (y > 31) { x = 127 - x;