diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index fb24f589e06..dba66f615f8 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -386,7 +386,7 @@ static void curvemap_make_table(CurveMap *cuma, rctf *clipr) while(curf >= fp[0] && fp!=lastpoint) { fp+=2; } - if(fp==lastpoint) + if(curf >= fp[0] && fp==lastpoint) cmp[a].y= fp[1]; else { float fac1= fp[0] - fp[-2]; diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c index 1df46f4e50b..4f799142769 100644 --- a/source/blender/src/interface_draw.c +++ b/source/blender/src/interface_draw.c @@ -2196,7 +2196,7 @@ static void ui_draw_but_CURVE(uiBut *but) fy= but->y1 + zoomy*(cmp[a].y-offsy); glVertex2f(fx, fy); } - glVertex2f(but->x2, but->y1 + zoomy*(cmp[a-1].y-offsy)); /* last point */ + glVertex2f(but->x2, but->y1 + zoomy*(cmp[CM_TABLE].y-offsy)); /* last point */ glEnd(); /* the points, use aspect to make them visible on edges */