Skip to content

Commit

Permalink
Fix a memory violation error
Browse files Browse the repository at this point in the history
  • Loading branch information
chi3236 committed Feb 20, 2017
1 parent a8283a3 commit 7dfd947
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions windows/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ int main() {
double center_to_left = -1;

for (int j = 0; j<150; j++) {
if (contours.at<unsigned char>(i, bottom_center + j) == 112 && center_to_right == -1) {
if (contours.at<uchar>(i, bottom_center + j) == 112 && center_to_right == -1) {
center_to_right = j;
}
if (contours.at<unsigned char>(i, bottom_center - j) == 112 && center_to_left == -1) {
if (contours.at<uchar>(i, bottom_center - j) == 112 && center_to_left == -1) {
center_to_left = j;
}
}
Expand Down

0 comments on commit 7dfd947

Please sign in to comment.