[cgma-dev] r3323 - cgm/trunk/itaps
jvporter at wisc.edu
jvporter at wisc.edu
Tue Nov 10 16:50:23 CST 2009
Author: jvporter
Date: 2009-11-10 16:50:22 -0600 (Tue, 10 Nov 2009)
New Revision: 3323
Modified:
cgm/trunk/itaps/iGeom_CGMA.cc
Log:
* Fix memory/sizing bugs in iGeom_getArr1stDrtv
* Make offset arrays from iGeom_getArr1stDrtv have the usual semantics
Modified: cgm/trunk/itaps/iGeom_CGMA.cc
===================================================================
--- cgm/trunk/itaps/iGeom_CGMA.cc 2009-11-10 20:02:09 UTC (rev 3322)
+++ cgm/trunk/itaps/iGeom_CGMA.cc 2009-11-10 22:50:22 UTC (rev 3323)
@@ -4966,15 +4966,15 @@
int *v_offset_size,
int* err)
{
- if (entity_handles_size != 2*uv_size) {
+ if (2*entity_handles_size != uv_size) {
ERROR(iBase_INVALID_ENTITY_COUNT, "Mismatched input array sizes.");
RETURN(iBase_INVALID_ENTITY_COUNT);
}
CHECK_SIZE( *drvt_u, double, 3*entity_handles_size );
CHECK_SIZE( *drvt_v, double, 3*entity_handles_size );
- CHECK_SIZE( *u_offset, int, entity_handles_size );
- CHECK_SIZE( *v_offset, int, entity_handles_size );
+ CHECK_SIZE( *u_offset, int, entity_handles_size+1 );
+ CHECK_SIZE( *v_offset, int, entity_handles_size+1 );
size_t u_step, du_step, init;
if (storage_order == iBase_BLOCKED) {
@@ -5015,15 +5015,18 @@
v += u_step;
du_x += du_step;
du_y += du_step;
- du_y += du_step;
+ du_z += du_step;
dv_x += du_step;
dv_y += du_step;
- dv_y += du_step;
+ dv_z += du_step;
(*u_offset)[i] = off;
(*v_offset)[i] = off;
off += du_step;
}
+ (*u_offset)[entity_handles_size] = off;
+ (*v_offset)[entity_handles_size] = off;
+
RETURN(iBase_SUCCESS);
}
More information about the cgma-dev
mailing list