diff --git a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp index 99150d52..ec2a62d9 100644 --- a/source/Irrlicht/CB3DJSONMeshFileLoader.cpp +++ b/source/Irrlicht/CB3DJSONMeshFileLoader.cpp @@ -181,13 +181,17 @@ std::tuple CB3DJSONMeshFileLoader::readChunkTEXS() { json textureArray = texs["textures"]; - // t stands for texture. :D Come back next week for more knowledge. - for (auto t = textureArray.begin(); t != textureArray.end(); ++t) { - + for (auto reference = textureArray.begin(); reference != textureArray.end(); ++reference) { + + // t stands for texture. :D Come back next week for more knowledge. + json t = *reference; + // This is a very strange way to do this but I won't complain. Textures.push_back(SB3dTexture()); SB3dTexture& B3DTexture = Textures.getLast(); + // This should probably be it's own function. +