From dec3e2ba42e60be8c4ae3ba2a2f08d32ead77d51 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 14 Dec 2017 18:06:28 +0100 Subject: [PATCH] XGLLoader: fix const issue when seeting vec2. --- code/XGLLoader.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/XGLLoader.cpp b/code/XGLLoader.cpp index 8ef91afac..97fe4fbd5 100644 --- a/code/XGLLoader.cpp +++ b/code/XGLLoader.cpp @@ -904,12 +904,14 @@ aiVector2D XGLImporter::ReadVec2() } const char* s = m_reader->getNodeData(); - for(int i = 0; i < 2; ++i) { + ai_real v[2]; + for(int i = 0; i < 2; ++i) { if(!SkipSpaces(&s)) { LogError("unexpected EOL, failed to parse vec2"); return vec; } - vec[i] = fast_atof(&s); + + v[i] = fast_atof(&s); SkipSpaces(&s); if (i != 1 && *s != ',') { @@ -918,6 +920,8 @@ aiVector2D XGLImporter::ReadVec2() } ++s; } + vec.x = v[0]; + vex.y = v[1]; return vec; }