mirror of
https://github.com/opencv/opencv.git
synced 2026-07-27 22:33:03 +04:00
committed by
Alexander Alekhin
parent
5e2bcc9149
commit
f9c514b391
@@ -250,7 +250,7 @@ cvInitMatNDHeader( CvMatND* mat, int dims, const int* sizes,
|
||||
for( int i = dims - 1; i >= 0; i-- )
|
||||
{
|
||||
if( sizes[i] < 0 )
|
||||
CV_Error( CV_StsBadSize, "one of dimesion sizes is non-positive" );
|
||||
CV_Error( CV_StsBadSize, "one of dimension sizes is non-positive" );
|
||||
mat->dim[i].size = sizes[i];
|
||||
if( step > INT_MAX )
|
||||
CV_Error( CV_StsOutOfRange, "The array is too big" );
|
||||
@@ -545,7 +545,7 @@ cvCreateSparseMat( int dims, const int* sizes, int type )
|
||||
for( i = 0; i < dims; i++ )
|
||||
{
|
||||
if( sizes[i] <= 0 )
|
||||
CV_Error( CV_StsBadSize, "one of dimesion sizes is non-positive" );
|
||||
CV_Error( CV_StsBadSize, "one of dimension sizes is non-positive" );
|
||||
}
|
||||
|
||||
CvSparseMat* arr = (CvSparseMat*)cvAlloc(sizeof(*arr)+MAX(0,dims-CV_MAX_DIM)*sizeof(arr->size[0]));
|
||||
|
||||
Reference in New Issue
Block a user