From 04cbb956bfd9a7305b1a786992ebe9b4fe5b4e88 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Wed, 29 Jun 2011 15:21:49 +0000 Subject: [PATCH] fixed problem with copying huge matrices (and probably other operations on huge matrices) (#1176) --- modules/core/src/matrix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/matrix.cpp b/modules/core/src/matrix.cpp index 987b57a086..f0905a180b 100644 --- a/modules/core/src/matrix.cpp +++ b/modules/core/src/matrix.cpp @@ -148,7 +148,7 @@ static void updateContinuityFlag(Mat& m) break; } - int64 t = (int64)(m.step[0]/CV_ELEM_SIZE(m.flags))*m.size[0]; + int64 t = (int64)m.step[0]*m.size[0]; if( j <= i && t == (int)t ) m.flags |= Mat::CONTINUOUS_FLAG; else