Skip to content
Snippets Groups Projects
Commit 5660bb35 authored by Mark Winter's avatar Mark Winter
Browse files

Corrected logic error in numeric array checks

parent 982de317
No related branches found
No related tags found
No related merge requests found
......@@ -263,7 +263,7 @@ namespace Script
template <typename T, ENABLE_CHK(NUMERIC_MATCH(T))>
inline static ImageView<T> toImage(const ArrayType* mexArray)
{
if ( !mxIsNumeric(mexArray) || !mxIsLogical(mexArray) )
if ( !mxIsNumeric(mexArray) && !mxIsLogical(mexArray) )
throw ImageConvertError("Expected a numeric or logical matrix");
Script::IdType type = Script::Array::getType(mexArray);
......@@ -280,7 +280,7 @@ namespace Script
template <typename T, ENABLE_CHK(NUMERIC_MATCH(T))>
inline static ImageOwner<T> toImageCopy(const ArrayType* mexArray)
{
if ( !mxIsNumeric(mexArray) || !mxIsLogical(mexArray) )
if ( !mxIsNumeric(mexArray) && !mxIsLogical(mexArray) )
throw ImageConvertError("Expected a numeric or logical matrix");
Script::DimInfo info = Script::getDimInfo(mexArray);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment