Skip to content

Commit

Permalink
validate dwaCompressionLevel attribute type (AcademySoftwareFoundatio…
Browse files Browse the repository at this point in the history
…n#1160)

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
Signed-off-by: Julian Amann <julian.amann@tum.de>
  • Loading branch information
peterhillman authored and Vertexwahn committed Sep 30, 2021
1 parent 35b6908 commit f65eb52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/OpenEXR/ImfHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ Header::insert (const char name[], const Attribute &attribute)
THROW (IEX_NAMESPACE::ArgExc, "Image attribute name cannot be an empty string.");

AttributeMap::iterator i = _map.find (name);
if (!strcmp (name, "dwaCompressionLevel"))
if (!strcmp (name, "dwaCompressionLevel") && !strcmp (attribute.typeName(),"float") )
{
const TypedAttribute<float>& dwaattr =
dynamic_cast<const TypedAttribute<float>&> (attribute);
Expand Down

0 comments on commit f65eb52

Please sign in to comment.