fixed writing huge matrices (ticket #1439)

This commit is contained in:
Vadim Pisarevsky
2012-03-28 09:57:31 +00:00
parent 6848c6d69a
commit 24bc0db1b0
2 changed files with 30 additions and 1 deletions

View File

@@ -3410,7 +3410,7 @@ icvWriteMat( CvFileStorage* fs, const char* name,
}
for( y = 0; y < size.height; y++ )
cvWriteRawData( fs, mat->data.ptr + y*mat->step, size.width, dt );
cvWriteRawData( fs, mat->data.ptr + (size_t)y*mat->step, size.width, dt );
}
cvEndWriteStruct( fs );
cvEndWriteStruct( fs );