Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-05-10 00:26:34 +0400
committerTon Roosendaal <ton@blender.org>2006-05-10 00:26:34 +0400
commit12e2f68bff2e1a953aa8a0412f6dd8db3e79d87f (patch)
tree8e466c2da478d0d2805bbcb131bc35092a4977ba /source/blender/blenkernel/intern/colortools.c
parentd66d173c20cb3275372ae78690a8b5b96ab24bd7 (diff)
Potential bugfix #4141
The curves tool didn't extend after last point correctly, in linux/windows. Stupid bug found by Joeedh. thanks!
Diffstat (limited to 'source/blender/blenkernel/intern/colortools.c')
-rw-r--r--source/blender/blenkernel/intern/colortools.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 81a202b796b..fb24f589e06 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -285,7 +285,7 @@ static void curvemap_make_table(CurveMap *cuma, rctf *clipr)
{
CurveMapPoint *cmp= cuma->curve;
BezTriple *bezt;
- float *fp, *allpoints, curf, range;
+ float *fp, *allpoints, *lastpoint, curf, range;
int a, totpoint;
if(cuma->curve==NULL) return;
@@ -373,6 +373,7 @@ static void curvemap_make_table(CurveMap *cuma, rctf *clipr)
/* now make a table with CM_TABLE equal x distances */
fp= allpoints;
+ lastpoint= allpoints + 2*(totpoint-1);
cmp= MEM_callocT((CM_TABLE+1)*sizeof(CurveMapPoint), "dist table");
cmp[0].x= cuma->mintable;
cmp[0].y= allpoints[1];
@@ -382,10 +383,10 @@ static void curvemap_make_table(CurveMap *cuma, rctf *clipr)
cmp[a].x= curf;
/* get the first x coordinate larger than curf */
- while(curf >= fp[0] && fp!=allpoints-2) {
+ while(curf >= fp[0] && fp!=lastpoint) {
fp+=2;
}
- if(fp==allpoints-2)
+ if(fp==lastpoint)
cmp[a].y= fp[1];
else {
float fac1= fp[0] - fp[-2];