Fix potential lod bug in mdodel decode.
This commit is contained in:
@@ -1132,9 +1132,7 @@ bool LLModel::loadModel(std::istream& is)
|
||||
"physics_mesh",
|
||||
}};
|
||||
|
||||
const S32 MODEL_LODS = lod_name.size();
|
||||
|
||||
S32 lod = llclamp((S32) mDetail, 0, MODEL_LODS);
|
||||
S32 lod = llclamp((S32) mDetail, 0, (S32)lod_name.size() - 1);
|
||||
|
||||
if (header[lod_name[lod]]["offset"].asInteger() == -1 ||
|
||||
header[lod_name[lod]]["size"].asInteger() == 0 )
|
||||
|
||||
Reference in New Issue
Block a user