[Gridflow-cvs] [svn] commit: r4100 - /trunk/base/flow_objects.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Oct 10 11:17:14 EDT 2008


Author: matju
Date: Fri Oct 10 11:17:13 2008
New Revision: 4100

Log:
fix divide-by-zero crash in [#transpose] when processing zero-sized grids

Modified:
    trunk/base/flow_objects.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Fri Oct 10 11:17:13 2008
@@ -1181,7 +1181,7 @@
 	} else {
 		nd = in->dim->prod(1+max(d1,d2));
 		nc = in->dim->v[max(d1,d2)];
-		nb = in->dim->prod(1+min(d1,d2))/nc/nd;
+		nb = nc&&nd ? in->dim->prod(1+min(d1,d2))/nc/nd : 0;
 		na = in->dim->v[min(d1,d2)];
 		out=new GridOutlet(this,0,new Dim(in->dim->n,v), in->nt);
 		in->set_chunk(min(d1,d2));



More information about the Gridflow-cvs mailing list