[trunk] Explicitely reject file4/file6 scenario
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 17 Mar 2014 16:18:22 +0000 (16:18 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 17 Mar 2014 16:18:22 +0000 (16:18 +0000)
Update issue 286

tests/compare_images.c

index 38c36f51ff1ec884d84efcda0b0cb01359f67d48..cb1b1301147bc6a0c13703b950c430644947e0fd 100644 (file)
@@ -771,6 +771,13 @@ int main(int argc, char **argv)
   /* Comparison of header parameters*/
   printf("Step 1 -> Header comparison\n");
 
+  /* check dimensions (issue 286)*/
+  if(imageBase->numcomps != imageTest->numcomps )
+    {
+    printf("ERROR: dim mismatch (%d><%d)\n", imageBase->numcomps, imageTest->numcomps);
+    goto cleanup;
+    }
+
   for (it_comp = 0; it_comp < imageBase->numcomps; it_comp++)
     {
     param_image_diff[it_comp].x0 = 0;