diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2013-11-12 19:58:26 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2013-11-12 19:58:26 +0400 |
commit | e62ef35fbfca7a59617bf123dcf5d092f1a79bdb (patch) | |
tree | 94954c8d2fa4e78b098fb6a13a08937974732762 | |
parent | 3464e646f7fdd92aeaafeee8112ddb1f82a9c04a (diff) |
Bugfix: some binary STL files were not correctly parsed on Windows. #1370 1467
-rw-r--r-- | xs/src/admesh/stlinit.c | 3 |
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; } } |