aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-02-22 15:38:14 +0100
committerThomas White <taw@physics.org>2012-02-22 15:38:14 +0100
commit2d68706307c774f19d217cfbb23296772a7bae1e (patch)
tree5d48113e953301b1a9582378e51490631bea49be /libcrystfel
parent5c35542beddaebf6602e17fbc8f55bb8119be411 (diff)
Fix bounds of image feature number (spotted by Chuck)
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index e54e645c..c46f5056 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -143,7 +143,7 @@ struct imagefeature *image_get_feature(ImageFeatureList *flist, int idx)
{
/* Sanity check */
if ( flist == NULL ) return NULL;
- if ( idx > flist->n_features ) return NULL;
+ if ( idx >= flist->n_features ) return NULL;
if ( flist->features[idx].valid == 0 ) return NULL;