Эх сурвалжийг харах

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 жил өмнө
parent
commit
8b6fc07828

+ 1 - 1
include/igl/writeDMAT.cpp

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