]> Creatis software - gdcm.git/blobdiff - src/gdcmDataEntry.cxx
Still doesn't work on Big Endian processor, but we display error correctly
[gdcm.git] / src / gdcmDataEntry.cxx
index 4f8937e9faf603d99db15640e62da7abaa3b076d..6dc581e8b040c535a63a81258bb9fde984a4ec8d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDataEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/25 14:27:37 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2005/10/26 15:56:51 $
+  Version:   $Revision: 1.13 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -54,7 +54,7 @@ DataEntry::DataEntry(DictEntry *e)
 DataEntry::DataEntry(DocEntry *e)
             : DocEntry(e->GetDictEntry())
 {
-   Flag = 0;
+   Flag = FLAG_NONE;
    BinArea = 0;
    SelfArea = true;
 
@@ -379,7 +379,8 @@ void DataEntry::SetString(std::string const &value)
          size_t l =  value.size();    
          SetLength(l + l%2);
          NewBinArea();
-         memcpy(BinArea, &(value[0]), l);
+         //memcpy(BinArea, &(value[0]), l);
+         memcpy(BinArea, value.c_str(), l);
          if (l%2)
             BinArea[l] = '\0';
       }