From 2391432523161e902b5f84ec97780a86e142edcc Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 3 Feb 2021 21:07:28 +0100 Subject: [PATCH] fix overflow --- code/AssetLib/Collada/ColladaLoader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/AssetLib/Collada/ColladaLoader.cpp b/code/AssetLib/Collada/ColladaLoader.cpp index c3264dd2b..13cf0a9d4 100644 --- a/code/AssetLib/Collada/ColladaLoader.cpp +++ b/code/AssetLib/Collada/ColladaLoader.cpp @@ -1538,9 +1538,9 @@ void ColladaLoader::AddTexture(aiMaterial &mat, map = sampler.mUVId; } else { map = -1; - for (auto it : sampler.mUVChannel) { - if (IsNumeric(it)) { - map = strtoul10(&it); + for (std::string::const_iterator it = sampler.mUVChannel.begin(); it != sampler.mUVChannel.end(); ++it) { + if (IsNumeric(*it)) { + map = strtoul10(&(*it)); break; } }