Skip to content

Commit

Permalink
Fix incorrect vec3 array size validation
Browse files Browse the repository at this point in the history
Copy/paste error in objectToV3, should be looking for a.size()==3, not 2.

Signed-off-by: Cary Phillips <[email protected]>
  • Loading branch information
cary-ilm authored and kdt3rd committed Jan 1, 2025
1 parent a339075 commit 82391c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wrappers/python/PyOpenEXR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@ objectToV3(const py::object& object, Vec3<T>& v)
else if (py::isinstance<py::array_t<T>>(object))
{
auto a = object.cast<py::array_t<T>>();
if (a.ndim() == 1 && a.size() == 2)
if (a.ndim() == 1 && a.size() == 3)
{
auto p = static_cast<T*>(a.request().ptr);
v.x = p[0];
Expand Down

0 comments on commit 82391c9

Please sign in to comment.