[Gridflow-cvs] [svn] commit: r5027 - /trunk/src/grid.cxx

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Sat Feb 20 01:46:38 EST 2010


Author: matju
Date: Sat Feb 20 01:46:37 2010
New Revision: 5027

Log:
did i just fix the awful [#redim] bug ?

Modified:
    trunk/src/grid.cxx

Modified: trunk/src/grid.cxx
==============================================================================
--- trunk/src/grid.cxx (original)
+++ trunk/src/grid.cxx Sat Feb 20 01:46:37 2010
@@ -259,13 +259,15 @@
 #undef FOO
 	} else {
 		dex += n;
-		if (n > MIN_PACKET_SIZE || bufi + n > MAX_PACKET_SIZE) flush();
 		if (n > MIN_PACKET_SIZE) {
+			flush();
 			//post("send_direct %d",n);
 			send_direct(n,data);
 		} else {
 			//post("send_indirect %d",n);
 			if (!buf) create_buf();
+			int32 v = buf->dim->prod();
+			if (bufi + n > v) flush();
 			COPY((T *)*buf+bufi,data,n);
 			bufi += n;
 		}



More information about the Gridflow-cvs mailing list