From 041e9877a3838e8441618901dc20e89311de428c Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 12 Nov 2011 11:57:22 +0100 Subject: [PATCH] Bugfix: parsing fatal error on Windows. #38 --- lib/Slic3r/STL.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/STL.pm b/lib/Slic3r/STL.pm index 107ce2425..602c69d36 100644 --- a/lib/Slic3r/STL.pm +++ b/lib/Slic3r/STL.pm @@ -264,9 +264,10 @@ sub _read_binary { die "bigfloat" unless length(pack "f", 1) == 4; + binmode $fh; seek $fh, 80 + 4, 0; while (read $fh, $_, 4*4*3+2) { - my @v = unpack '(f3)4'; + my @v = unpack '(f<3)4'; push @$facets, [ [@v[0..2]], [@v[3..5]], [@v[6..8]], [@v[9..11]] ]; } }