From d30af29ee2540eb80d878ff7df6841a7379713cd Mon Sep 17 00:00:00 2001 From: nihui Date: Thu, 21 Dec 2023 12:16:42 +0800 Subject: [PATCH] fix simplecv Mat templated ptr (#5241) --- src/simpleocv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simpleocv.h b/src/simpleocv.h index 54b22d9f9..015e48b4c 100644 --- a/src/simpleocv.h +++ b/src/simpleocv.h @@ -398,13 +398,13 @@ struct NCNN_EXPORT Mat template const _Tp* ptr(int y) const { - return (const _Tp*)data + y * cols * c; + return (const _Tp*)(data + y * cols * c); } template _Tp* ptr(int y) { - return (_Tp*)data + y * cols * c; + return (_Tp*)(data + y * cols * c); } // roi