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>
  • Loading branch information
peterhillman authored and cary-ilm committed Oct 13, 2021
1 parent 5312b9b commit e7b5682
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 e7b5682

Please sign in to comment.