Skip to content

Commit 10676f8

Browse files
committed
Merge pull request opencv#11971 from csukuangfj:patch_1
2 parents 23fc96e + 2b6aa50 commit 10676f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/core/src/check.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static const char* getTestOpMath(unsigned testOp)
4444
const char* depthToString_(int depth)
4545
{
4646
static const char* depthNames[] = { "CV_8U", "CV_8S", "CV_16U", "CV_16S", "CV_32S", "CV_32F", "CV_64F", "CV_USRTYPE1" };
47-
return depth <= CV_USRTYPE1 ? depthNames[depth] : NULL;
47+
return (depth <= CV_USRTYPE1 && depth >= 0) ? depthNames[depth] : NULL;
4848
}
4949

5050
const cv::String typeToString_(int type)

0 commit comments

Comments
 (0)