From a7b6bff5533179b36d2a9de933b4bf0e642f6aac Mon Sep 17 00:00:00 2001 From: malaterre Date: Fri, 21 Oct 2005 15:52:13 +0000 Subject: [PATCH] BUG: 1-n VM are also allowed to be empty --- src/gdcmDataEntry.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gdcmDataEntry.cxx b/src/gdcmDataEntry.cxx index b9513cfa..4d7b7628 100644 --- a/src/gdcmDataEntry.cxx +++ b/src/gdcmDataEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDataEntry.cxx,v $ Language: C++ - Date: $Date: 2005/10/21 15:41:56 $ - Version: $Revision: 1.8 $ + Date: $Date: 2005/10/21 15:52:13 $ + Version: $Revision: 1.9 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -224,17 +224,17 @@ bool DataEntry::IsValueCountValid() const bool valid = false; uint32_t vm; const std::string &strVM = GetVM(); + uint32_t vc = GetValueCount(); if( strVM == "1-n" ) { // make sure it is at least one ??? FIXME - valid = GetValueCount() >= 1; + valid = vc >= 1 || vc == 0; } else { std::istringstream os; os.str( strVM ); os >> vm; - uint32_t vc = GetValueCount(); // Two cases: // vm respect the one from the dict // vm is 0 (we need to check is this element is allowed to be empty) FIXME -- 2.48.1