mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-01 09:22:58 -05:00
The STL reader took the file size from ftell(), which returns a long. long is 32-bit on Windows, so a file over 2 GB got a wrong size and was rejected as malformed. Take the size from boost::nowide::stat, which handles UTF-8 paths and is 64-bit on every platform, and refuse files with more facets than the int counters downstream can hold. Ported from Snapmaker/OrcaSlicer@b070bcfaff Co-authored-by: owlin22 <a1483829525@163.com>