diff --git a/console/nii_dicom_batch.cpp b/console/nii_dicom_batch.cpp index 8ef4fa89..3b2eb676 100644 --- a/console/nii_dicom_batch.cpp +++ b/console/nii_dicom_batch.cpp @@ -4266,7 +4266,7 @@ int nii_saveNRRD(char *niiFilename, struct nifti_1_header hdr, unsigned char *im strcat(fname, ".nhdr"); //nrrd or nhdr else strcat(fname, ".nrrd"); //nrrd or nhdr - FILE *fp = fopen(fname, "wb"); + FILE *fp = fopen(fname, "w"); fprintf(fp, "NRRD0005\n"); fprintf(fp, "# Complete NRRD file format specification at:\n"); fprintf(fp, "# http://teem.sourceforge.net/nrrd/format.html\n");