From 478411bf82ad3fc557b46b0fb5290d5d1f8b6504 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Fri, 24 Nov 2017 09:27:45 +0100 Subject: [PATCH] [Sonar] Condition always evaluated to false --- radio/src/gui/480x272/bitmapbuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/gui/480x272/bitmapbuffer.cpp b/radio/src/gui/480x272/bitmapbuffer.cpp index 0eb85f7a1..6060a728f 100644 --- a/radio/src/gui/480x272/bitmapbuffer.cpp +++ b/radio/src/gui/480x272/bitmapbuffer.cpp @@ -436,7 +436,7 @@ void BitmapBuffer::drawBitmapPie(int x0, int y0, const uint16_t * img, int start for (int y=h2-1; y>=0; y--) { for (int x=w2-1; x>=0; x--) { - int slope = (x==0 ? (y<0 ? -99000 : 99000) : y*100/x); + int slope = (x==0 ? 99000 : y*100/x); if (slope >= slopes[0] && slope < slopes[1]) { *getPixelPtr(x0+w2+x, y0+h2-y) = q[(h2-y)*width + w2+x]; }