mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 03:12:36 +01:00
Fix off-by-one error in Simple Model atomic lookup
This commit is contained in:
parent
308d1d6deb
commit
e1f7d11c82
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user