]> Creatis software - gdcm.git/blobdiff - src/gdcmDocument.cxx
* gdcmPython/gdcm.i : bug fix. Now string are correctly converted in python
[gdcm.git] / src / gdcmDocument.cxx
index 38595140ebb1661ab1a1bb723a89780681910ce5..9c12f0ce8a8aa4f97e5210cd1c9dfec6311580ac 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/02/05 01:37:08 $
-  Version:   $Revision: 1.223 $
+  Date:      $Date: 2005/02/07 09:51:03 $
+  Version:   $Revision: 1.225 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -30,6 +30,7 @@
 
 #include <vector>
 #include <iomanip>
+#include <fstream>
 
 // For nthos:
 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__) 
@@ -415,7 +416,7 @@ std::ifstream *Document::OpenFile()
       return 0;
    }
  
-   uint16_t zero;
+   uint16_t zero = 0;
    Fp->read((char*)&zero, (size_t)2);
    if( Fp->eof() )
    {
@@ -438,7 +439,7 @@ std::ifstream *Document::OpenFile()
  
    //DICOM
    Fp->seekg(126L, std::ios::cur);
-   char dicm[4];
+   char dicm[4] = {' ',' ',' ',' '};
    Fp->read(dicm,  (size_t)4);
    if( Fp->eof() )
    {