From 94538e9d8774d3b2252b7f1305cfe4bacc901c48 Mon Sep 17 00:00:00 2001 From: wise86Android Date: Sat, 24 Sep 2016 20:19:43 +0200 Subject: [PATCH] 122193 Uninitialized scalar variable --- code/LWOLoader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/LWOLoader.cpp b/code/LWOLoader.cpp index 222ec8e2c..df2cab7bc 100644 --- a/code/LWOLoader.cpp +++ b/code/LWOLoader.cpp @@ -1058,8 +1058,6 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly) LWO::PointList& pointList = mCurLayer->mTempPoints; LWO::ReferrerList& refList = mCurLayer->mPointReferrers; - float temp[4]; - const unsigned int numPoints = (unsigned int)pointList.size(); const unsigned int numFaces = (unsigned int)list.size(); @@ -1123,10 +1121,12 @@ void LWOImporter::LoadLWO2VertexMap(unsigned int length, bool perPoly) } } } + + std::unique_ptr temp(new float[type]); for (unsigned int l = 0; l < type;++l) temp[l] = GetF4(); - DoRecursiveVMAPAssignment(base,type,idx, temp); + DoRecursiveVMAPAssignment(base,type,idx, temp.get()); mFileBuffer += diff; } }