Merge branch 'master' of https://github.com/prusa3d/Slic3r into dev

This commit is contained in:
Enrico Turri 2018-09-05 09:51:31 +02:00
commit 407aee9942
3 changed files with 17 additions and 9 deletions

View file

@ -286,7 +286,7 @@ void stl_read(stl_file *stl, int first_facet, bool first) {
{
// skip solid/endsolid
// (in this order, otherwise it won't work when they are paired in the middle of a file)
fscanf(stl->fp, "endsolid\n");
fscanf(stl->fp, "endsolid%*[^\n]\n");
fscanf(stl->fp, "solid%*[^\n]\n"); // name might contain spaces so %*s doesn't work and it also can be empty (just "solid")
// Leading space in the fscanf format skips all leading white spaces including numerous new lines and tabs.
int res_normal = fscanf(stl->fp, " facet normal %31s %31s %31s", normal_buf[0], normal_buf[1], normal_buf[2]);