Skip to content

Commit

Permalink
validate dwaCompressionLevel attribute type (#1160)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
  • Loading branch information
peterhillman committed Sep 28, 2021
1 parent 35b6908 commit 5d67067
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 5d67067

Please sign in to comment.