浏览代码

fix overflow

Kim Kulling 4 年之前
父节点
当前提交
2391432523
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      code/AssetLib/Collada/ColladaLoader.cpp

+ 3 - 3
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;
             }
         }