From 911bed827c9e3b8f88dbbf313a02f2dffd8be34c Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 9 Jun 2015 14:54:52 +0200 Subject: [PATCH] Fixed regression in STL parser. #2886 --- xs/src/admesh/stlinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/admesh/stlinit.c b/xs/src/admesh/stlinit.c index e92af81047..7f490c7882 100644 --- a/xs/src/admesh/stlinit.c +++ b/xs/src/admesh/stlinit.c @@ -290,7 +290,7 @@ stl_read(stl_file *stl, int first_facet, int 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, "solid %*s\n"); + fscanf(stl->fp, "solid %*[^\n]\n"); // name might contain spaces so %*s doesn't work if((fscanf(stl->fp, " facet normal %f %f %f\n", &facet.normal.x, &facet.normal.y, &facet.normal.z) + \ fscanf(stl->fp, " outer loop\n") + \