Skip to content

Commit b17d15f

Browse files
author
caryanne
committed
added clearing of unknown parameters map
not doing so caused undefined behavior in objects with multiple materials using custom parameters.
1 parent 8cc26a6 commit b17d15f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎tiny_obj_loader.cc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ void InitMaterial(material_t& material) {
270270
material.emission[i] = 0.f;
271271
}
272272
material.shininess = 1.f;
273+
material.unknown_parameter.clear();
273274
}
274275

275276
std::string LoadMtl (

0 commit comments

Comments
 (0)