From 4a39665804905df9de466130191c0d59902a8400 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 20 Jun 2015 14:16:23 +0200 Subject: [PATCH] Bugfix: binary ASCII files were not written with the correct fopen() mode. #2928 --- xs/src/admesh/stl_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/admesh/stl_io.c b/xs/src/admesh/stl_io.c index 2a530997b..e015cee99 100644 --- a/xs/src/admesh/stl_io.c +++ b/xs/src/admesh/stl_io.c @@ -269,7 +269,7 @@ stl_write_binary(stl_file *stl, const char *file, const char *label) { if (stl->error) return; /* Open the file */ - fp = fopen(file, "w"); + fp = fopen(file, "wb"); if(fp == NULL) { error_msg = (char*) malloc(81 + strlen(file)); /* Allow 80 chars+file size for message */