diff --git a/modules/imgproc/src/histogram.cpp b/modules/imgproc/src/histogram.cpp index 3f0c3daa2969..864b49b314d2 100644 --- a/modules/imgproc/src/histogram.cpp +++ b/modules/imgproc/src/histogram.cpp @@ -3023,7 +3023,7 @@ class EqualizeHistCalcHist_Invoker localHistogram[t0]++; localHistogram[t1]++; } - for (; x < width; ++x, ++ptr) + for (; x < width; ++x) localHistogram[ptr[x]]++; }