Commit 77116f35 authored by manuele's avatar manuele

buffer overrun fix

parent a9eebb91
...@@ -109,7 +109,7 @@ namespace xobjdetect ...@@ -109,7 +109,7 @@ namespace xobjdetect
{ {
//find first non visited index //find first non visited index
int i = 0; int i = 0;
while(visited[i] == true && i<(int)visited.size()) while(i<(int)visited.size() && visited[i] == true)
{ {
i++; i++;
} }
...@@ -123,7 +123,7 @@ namespace xobjdetect ...@@ -123,7 +123,7 @@ namespace xobjdetect
{ {
visited[next] = true; visited[next] = true;
int i = 0; int i = 0;
while(visited[i] == true && i<(int)visited.size()) while(i<(int)visited.size() && visited[i] == true)
{ {
i++; i++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment