From 7e56cfafbce36ffe2ee3b85cf1ac6395d45804d3 Mon Sep 17 00:00:00 2001 From: Yash Vadalia Date: Tue, 13 May 2014 19:59:37 +0530 Subject: [PATCH] fixed a syntax error in cap_giganetix.cpp Ticket 3458 (http://code.opencv.org/issues/3458) --- modules/highgui/src/cap_giganetix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/highgui/src/cap_giganetix.cpp b/modules/highgui/src/cap_giganetix.cpp index ccbe7020fa..e252a16430 100644 --- a/modules/highgui/src/cap_giganetix.cpp +++ b/modules/highgui/src/cap_giganetix.cpp @@ -711,13 +711,13 @@ CvCaptureCAM_Giganetix::setProperty( int property_id, double value ) INT64 w, wmax, val = (INT64)value; if((b_ret = m_device->GetIntegerNodeValue ("Width", w))) if((b_ret = m_device->GetIntegerNodeValue ("WidthMax", wmax))) - b_ret = m_device->SetIntegerNodeValue ("OffsetX", val w > wmax ? wmax - w : val); + b_ret = m_device->SetIntegerNodeValue ("OffsetX", (val + w) > wmax ? (wmax - w) : val); } break; case CV_CAP_PROP_GIGA_FRAME_OFFSET_Y: { INT64 h, hmax, val = (INT64)value; if((b_ret = m_device->GetIntegerNodeValue ("Height", h))) if((b_ret = m_device->GetIntegerNodeValue ("HeightMax", hmax))) - b_ret = m_device->SetIntegerNodeValue ("OffsetY", val h > hmax ? hmax - h : val); + b_ret = m_device->SetIntegerNodeValue ("OffsetY", (val + h) > hmax ? (hmax - h) : val); b_ret = m_device->SetIntegerNodeValue ("OffsetY", (INT64)value); } break; -- GitLab