]> Creatis software - creaImageIO.git/blobdiff - src/creaImageIOUltrasonixImageReader.cpp
thread bug correction
[creaImageIO.git] / src / creaImageIOUltrasonixImageReader.cpp
index 978bb03ec4bd0d89c7134fce65e7c735aac1b485..2b9d783838ec869cb5b8eaaa1ee5749fe5b76dcd 100644 (file)
@@ -55,7 +55,7 @@ namespace creaImageIO
   //=====================================================================
   bool UltrasonixImageReader::CanRead(const std::string& filename)
   { 
-    long size;
+    long size = -1;
     bool ok = false;
     FILE *Ultrasonix_file=fopen(filename.c_str(), "rb");
     if (Ultrasonix_file) 
@@ -77,7 +77,7 @@ namespace creaImageIO
                size = (ftell(Ultrasonix_file) - HEADER_SIZE * sizeof(int)) / sizeof(int);
 
        // check if the data size corresponds to the dimensions of the images
-       if (size == h.width * h.height * h.frame)
+       if (size == h.width * h.height * h.frame )
                ok = true;
 
        fclose(Ultrasonix_file);