]> Creatis software - gdcm.git/commitdiff
BUG: Write was clearly broken...can only blame myself
authormalaterre <malaterre>
Wed, 5 May 2004 02:13:02 +0000 (02:13 +0000)
committermalaterre <malaterre>
Wed, 5 May 2004 02:13:02 +0000 (02:13 +0000)
src/gdcmFile.cxx

index aa60bd7..1e7cf3d 100644 (file)
@@ -700,6 +700,7 @@ bool gdcmFile::WriteBase (std::string fileName, FileType type) {
       char * filePreamble;
       // writing Dicom File Preamble
       filePreamble=new char[128];
+      memset(filePreamble,0,128);
       fwrite(filePreamble,128,1,fp1);
       fwrite("DICM",4,1,fp1);
       delete[] filePreamble;