diff options
-rw-r--r-- | libcrystfel/src/image.c | 2 |
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; |