projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23fc96e
)
avoid negative index.
author
Kuang Fangjun
<csukuangfj@gmail.com>
Sat, 14 Jul 2018 08:05:29 +0000
(16:05 +0800)
committer
Kuang Fangjun
<csukuangfj@gmail.com>
Sat, 14 Jul 2018 08:05:29 +0000
(16:05 +0800)
modules/core/src/check.cpp
patch
|
blob
|
history
diff --git
a/modules/core/src/check.cpp
b/modules/core/src/check.cpp
index
ebaa294
..
fca9826
100644
(file)
--- a/
modules/core/src/check.cpp
+++ b/
modules/core/src/check.cpp
@@
-44,7
+44,7
@@
static const char* getTestOpMath(unsigned testOp)
const char* depthToString_(int depth)
{
static const char* depthNames[] = { "CV_8U", "CV_8S", "CV_16U", "CV_16S", "CV_32S", "CV_32F", "CV_64F", "CV_USRTYPE1" };
- return
depth <= CV_USRTYPE1
? depthNames[depth] : NULL;
+ return
(depth <= CV_USRTYPE1 && depth >= 0)
? depthNames[depth] : NULL;
}
const cv::String typeToString_(int type)