mirror of
https://github.com/opencv/opencv.git
synced 2025-01-13 00:01:27 +08:00
GCC 4.8 warning array subscript is above array bounds fixed.
(cherry picked from commit e11333dd83
)
This commit is contained in:
parent
f8758da289
commit
628b23acc8
@ -470,6 +470,12 @@ cvFloodFill( CvArr* arr, CvPoint seed_point,
|
|||||||
depth = CV_MAT_DEPTH(type);
|
depth = CV_MAT_DEPTH(type);
|
||||||
cn = CV_MAT_CN(type);
|
cn = CV_MAT_CN(type);
|
||||||
|
|
||||||
|
if ( (cn != 1) && (cn != 3) )
|
||||||
|
{
|
||||||
|
CV_Error( CV_StsBadArg, "Number of channels in input image must be 1 or 3" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( connectivity == 0 )
|
if( connectivity == 0 )
|
||||||
connectivity = 4;
|
connectivity = 4;
|
||||||
else if( connectivity != 4 && connectivity != 8 )
|
else if( connectivity != 4 && connectivity != 8 )
|
||||||
|
Loading…
Reference in New Issue
Block a user