From 3759e51365fadb78955811457295d8b82f90680a Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov <ivan@espressif.com> Date: Sun, 10 Jul 2016 14:46:13 +0800 Subject: [PATCH] Fix operator precedence error in drawVerticalLine --- OLEDDisplay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OLEDDisplay.cpp b/OLEDDisplay.cpp index 3a8e3e2..2161d3e 100644 --- a/OLEDDisplay.cpp +++ b/OLEDDisplay.cpp @@ -278,7 +278,7 @@ void OLEDDisplay::drawVerticalLine(int16_t x, int16_t y, int16_t length) { } if (length > 0) { - drawBit = (1 << length & 7) - 1; + drawBit = (1 << (length & 7)) - 1; switch (color) { case WHITE: *bufferPtr |= drawBit; break; case BLACK: *bufferPtr &= drawBit; break; -- GitLab