|
From: <kin...@us...> - 2024-07-17 19:03:37
|
Revision: 7221
http://sourceforge.net/p/teem/code/7221
Author: kindlmann
Date: 2024-07-17 19:03:34 +0000 (Wed, 17 Jul 2024)
Log Message:
-----------
clarifying comment; trying to fix memory error
Modified Paths:
--------------
teem/trunk/src/limn/limn.h
teem/trunk/src/limn/splineFit.c
Modified: teem/trunk/src/limn/limn.h
===================================================================
--- teem/trunk/src/limn/limn.h 2024-07-17 18:03:54 UTC (rev 7220)
+++ teem/trunk/src/limn/limn.h 2024-07-17 19:03:34 UTC (rev 7221)
@@ -522,10 +522,11 @@
double xy[8]; /* four control points of cubic Bezier:
x0, y0, x1, y1, x2, y2, x3, y3
0 1 2 3 4 5 6 7 DIM=2 */
- int corner[2]; /* corner[0,1] non-zero if xy[0,3] are either corner vertices
- or path-ending vertices, i.e. reasons to not have geometric
- continuity here, either because we intend to have a corner,
- or because there's nothing else to be continuous with */
+ int corner[2]; /* corner[0] is non-zero if vertex xy[0,1] is either a corner vertex
+ or a path-ending vertex, i.e. reasons to NOT have geometric
+ continuity there, either because we intend to have a corner,
+ or because there's nothing else to be continuous with.
+ corner[1] describes the same for xy[6,7]. */
/* how many points does this represent */
unsigned int pointNum;
} limnCbfSeg;
Modified: teem/trunk/src/limn/splineFit.c
===================================================================
--- teem/trunk/src/limn/splineFit.c 2024-07-17 18:03:54 UTC (rev 7220)
+++ teem/trunk/src/limn/splineFit.c 2024-07-17 19:03:34 UTC (rev 7221)
@@ -284,6 +284,7 @@
limnCbfPath *path;
path = AIR_MALLOC(1, limnCbfPath);
if (path) {
+ path->seg = NULL;
path->segArr = airArrayNew((void **)(&path->seg), &path->segNum, sizeof(limnCbfSeg),
128 /* incr */);
airArrayStructCB(path->segArr, segInit, NULL);
@@ -290,7 +291,7 @@
path->isLoop = AIR_FALSE;
if (segNum) {
airArrayLenSet(path->segArr, segNum);
- if (!path->segArr->data) {
+ if (!path->seg) {
/* whoa, couldn't allocate requested segments; return NULL and possibly leak */
path = NULL;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|