X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmHeaderEntry.cxx;h=5832ad315e8763c7b46c3c014a723fa40a099927;hb=873781d43a11ff95abe24564a3cee43a7d76a723;hp=d56d92117ab2cd3513a14547fbefde32aa1c30ab;hpb=b1cbd2d3c12ccac8b257901236fe8eb27a20b117;p=gdcm.git diff --git a/src/gdcmHeaderEntry.cxx b/src/gdcmHeaderEntry.cxx index d56d9211..5832ad31 100644 --- a/src/gdcmHeaderEntry.cxx +++ b/src/gdcmHeaderEntry.cxx @@ -79,7 +79,10 @@ void gdcmHeaderEntry::Print(std::ostream & os) { } s << "[" << GetName()<< "]"; - s << " [" << d2 << "]"; + if( (GetLength()<64) || (printLevel>=3) ) + s << " [" << d2 << "]"; + else + s << " [ gdcm::too long for print (" << GetLength() << ") ]"; // Display the UID value (instead of displaying the rough code) if (g == 0x0002) { // Any more to be displayed ? @@ -96,7 +99,7 @@ void gdcmHeaderEntry::Print(std::ostream & os) { if (v == "4294967295") // to avoid troubles in convertion sprintf (st," x(ffffffff)"); else - sprintf(st," x(%x)",atoi(v.c_str())); + sprintf(st," x(%x)",(unsigned long)atof(v.c_str())); s << st; } s << std::endl;