ソースを参照

Fix infinite loop in STL loader error path

It appears that this was never tested since hitting it caused an infinite loop.

Fixes testcase hangs/c2eb1fa3e74c6ffe0cebcb1672b03140
Turo Lamminen 10 年 前
コミット
b93bd167ed
1 ファイル変更1 行追加0 行削除
  1. 1 0
      code/STLLoader.cpp

+ 1 - 0
code/STLLoader.cpp

@@ -308,6 +308,7 @@ void STLImporter::LoadASCIIFile()
 		{
 		{
 			if (3 == curVertex)	{
 			if (3 == curVertex)	{
 				DefaultLogger::get()->error("STL: a facet with more than 3 vertices has been found");
 				DefaultLogger::get()->error("STL: a facet with more than 3 vertices has been found");
+				++sz;
 			}
 			}
 			else
 			else
 			{
 			{