]> Creatis software - gdcm.git/blobdiff - src/gdcmFile.cxx
avoid polluting output
[gdcm.git] / src / gdcmFile.cxx
index 59682e307fc20a0cec7017c6ae2632517564f698..da87e9ab9b2fd010ac2a2e53bdbf5dd72b6be98d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/25 08:41:35 $
-  Version:   $Revision: 1.291 $
+  Date:      $Date: 2005/10/25 12:41:30 $
+  Version:   $Revision: 1.293 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -1696,7 +1696,7 @@ bool File::ReadTag(uint16_t testGroup, uint16_t testElem)
    if ( itemTagGroup != testGroup || itemTagElem != testElem )
    { 
        // in order not to pollute output we don't warn on 'delimitors'
-      if (temTagGroup != 0xfffe ||  testGroup =! 0xfffe )
+      if (itemTagGroup != 0xfffe ||  testGroup != 0xfffe )
          gdcmErrorMacro( "Wrong Item Tag found:"
           << "   We should have found tag ("
           << DictEntry::TranslateToKey(testGroup,testElem) << ")" << std::endl
@@ -1731,7 +1731,9 @@ uint32_t File::ReadTagLength(uint16_t testGroup, uint16_t testElem)
 
    if ( !ReadTag(testGroup, testElem) )
    {
-      gdcmErrorMacro( "ReadTag did not succeed for ("
+      // Avoid polutting output
+      if ( testGroup != 0xfffe ) 
+         gdcmErrorMacro( "ReadTag did not succeed for ("
                     << DictEntry::TranslateToKey(testGroup,testElem) 
                     << ")..." );
       return 0;