Diff of /src/jags.cc [f1749a] .. [c629bb]  Maximize  Restore

Switch to side-by-side view

--- a/src/jags.cc
+++ b/src/jags.cc
@@ -149,9 +149,9 @@
 
 	int ndim = length(dim);
 	if (ndim == 0) {
-	    // Scalar or vector entry
-	    if (e2 > 0) {
-		SArray sarray(vector<unsigned int>(1, length(e2)));
+	    // Scalar or vector entry. Skip vectors of length zero
+	    if (elength > 0) {
+		SArray sarray(vector<unsigned int>(1, elength));
 		setSArrayValue(sarray, e2);
 		table.insert(pair<string,SArray>(ename, sarray));
 	    }

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks