Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2013-11-12 19:58:26 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-11-12 19:58:26 +0400
commite62ef35fbfca7a59617bf123dcf5d092f1a79bdb (patch)
tree94954c8d2fa4e78b098fb6a13a08937974732762
parent3464e646f7fdd92aeaafeee8112ddb1f82a9c04a (diff)
Bugfix: some binary STL files were not correctly parsed on Windows. #1370 1467
-rw-r--r--xs/src/admesh/stlinit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xs/src/admesh/stlinit.c b/xs/src/admesh/stlinit.c
index 1e8893039..b8cb9a6f1 100644
--- a/xs/src/admesh/stlinit.c
+++ b/xs/src/admesh/stlinit.c
@@ -98,6 +98,9 @@ stl_count_facets(stl_file *stl, char *file)
if(chtest[i] > 127)
{
stl->stats.type = binary;
+ // close and reopen with binary flag (needed on Windows)
+ fclose(stl->fp);
+ stl->fp = fopen(file, "rb");
break;
}
}