change "w" to "wb" in fopen to fix the binary dmat writing error (on Windows) Former-commit-id: 3943cb9d6be320cb8699d5c717a653b1340549aa
@@ -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());