浏览代码

change "w" to "wb" in fopen to fix the binary dmat writing error

Former-commit-id: 1f5e15dca3ae4495d56471b60f786a29159d852a
zcy 8 年之前
父节点
当前提交
fb0a3add59
共有 1 个文件被更改,包括 1 次插入1 次删除
  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());