]> 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 aa60bd7683b271c24715a09e712ccb35c61ba194..1e7cf3d4b609ff71bf55594cae99cd2312547d47 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;