Skip to content

Commit 2305182

Browse files
committed
Update nn_index.h
a bugfix
1 parent 5c4e348 commit 2305182

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cpp/flann/algorithms/nn_index.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ class NNIndex : public IndexBase
704704
return id;
705705
}
706706
size_t point_index = size_t(-1);
707-
if (ids_[id]==id) {
707+
if (id < ids_.size() && ids_[id]==id) {
708708
return id;
709709
}
710710
else {

0 commit comments

Comments
 (0)