From e1f7d11c8283fced24cbca16ee22ab1e5b5f6da1 Mon Sep 17 00:00:00 2001 From: Daniel Evans Date: Mon, 9 Jan 2017 20:56:49 +0000 Subject: [PATCH] Fix off-by-one error in Simple Model atomic lookup --- rwengine/src/engine/GameData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rwengine/src/engine/GameData.cpp b/rwengine/src/engine/GameData.cpp index 4777e7d2..e4960fc7 100644 --- a/rwengine/src/engine/GameData.cpp +++ b/rwengine/src/engine/GameData.cpp @@ -365,7 +365,7 @@ TextureArchive GameData::loadTextureArchive(const std::string& name) { void GameData::getNameAndLod(std::string& name, int& lod) { auto lodpos = name.rfind("_l"); if (lodpos != std::string::npos) { - lod = std::atoi(name.substr(lodpos + 1).c_str()); + lod = std::atoi(name.substr(lodpos + 2).c_str()); name = name.substr(0, lodpos); } }