Преглед на файлове

Merge pull request #1620 from assimp/issue_1619

FBX: closes https://github.com/assimp/assimp/issues/1619: return corr…
Kim Kulling преди 7 години
родител
ревизия
3d4256a7a7
променени са 1 файла, в които са добавени 2 реда и са изтрити 3 реда
  1. 2 3
      code/FBXConverter.cpp

+ 2 - 3
code/FBXConverter.cpp

@@ -440,12 +440,11 @@ private:
 	bool FindTextureIndexByFilename(const Video& video, unsigned int& index) {
 	bool FindTextureIndexByFilename(const Video& video, unsigned int& index) {
 		index = 0;
 		index = 0;
 		const char* videoFileName = video.FileName().c_str();
 		const char* videoFileName = video.FileName().c_str();
-		for (auto texture = textures_converted.begin(); texture != textures_converted.end(); ++texture)
-		{
+		for (auto texture = textures_converted.begin(); texture != textures_converted.end(); ++texture) {
 			if (!strcmp(texture->first->FileName().c_str(), videoFileName)) {
 			if (!strcmp(texture->first->FileName().c_str(), videoFileName)) {
+                index = texture->second;
 				return true;
 				return true;
 			}
 			}
-			index++;
 		}
 		}
 		return false;
 		return false;
 	}
 	}