Diff of /src/agf.cc [r78] .. [r79] Maximize Restore

  Switch to side-by-side view

--- a/src/agf.cc
+++ b/src/agf.cc
@@ -185,15 +185,16 @@
     real_a **testnew;
 
     mat=read_stats2(opt_args.normfile, b, nvar2, nvar3);
+    printf("nvar=%d; nvar3=%d\n", nvar, nvar3);
     assert(nvar3==nvar);			//should be true
+    if (nvar2!=nvar1) {
+      fprintf(stderr, "agf: incorrect number of dimensions in test data (%d found, %d expected)\n", nvar1, nvar2);
+      exit(DIMENSION_MISMATCH);
+    }
     for (nel_ta i=0; i<ntest; i++) {
       for (dim_ta j=0; j<nvar2; j++) {
         test[i][j]-=b[j];
       }
-    }
-    if (nvar2!=nvar1) {
-      fprintf(stderr, "agf: incorrect number of dimensions in test data (%d found, %d expected)\n", nvar1, nvar2);
-      exit(DIMENSION_MISMATCH);
     }
     testnew=matrix_mult(test, mat, ntest, nvar1, nvar);
     delete_matrix(test);