[Horus] Segfault when a curve goes out of the screen

This commit is contained in:
Bertrand Songis
2015-12-23 19:40:04 +01:00
parent 42473d6868
commit b818c0df6b
+1 -1
View File
@@ -38,7 +38,7 @@
coord_t getCurveYCoord(FnFuncP fn, coord_t x)
{
return limit(0, CURVE_CENTER_Y - divRoundClosest(fn(divRoundClosest(x * RESX, CURVE_SIDE_WIDTH)) * CURVE_SIDE_WIDTH, RESX), LCD_H-1);
return limit(CURVE_CENTER_Y-CURVE_SIDE_WIDTH, CURVE_CENTER_Y - divRoundClosest(fn(divRoundClosest(x * RESX, CURVE_SIDE_WIDTH)) * CURVE_SIDE_WIDTH, RESX), CURVE_CENTER_Y+CURVE_SIDE_WIDTH);
}
void drawFunction(FnFuncP fn, int offset)