Browse Source

Merge pull request #345 from Zcynical/binary_dmat_writing

change "w" to "wb" in fopen to fix the binary dmat writing error (on Windows)

Former-commit-id: 3943cb9d6be320cb8699d5c717a653b1340549aa
Alec Jacobson 8 years ago
parent
commit
8b6fc07828
1 changed files with 1 additions and 1 deletions
  1. 1 1
      include/igl/writeDMAT.cpp

+ 1 - 1
include/igl/writeDMAT.cpp

@@ -18,7 +18,7 @@ IGL_INLINE bool igl::writeDMAT(
   const Mat & W,
   const bool ascii)
 {
-  FILE * fp = fopen(file_name.c_str(),"w");
+  FILE * fp = fopen(file_name.c_str(),"wb");
   if(fp == NULL)
   {
     fprintf(stderr,"IOError: writeDMAT() could not open %s...",file_name.c_str());