diff options
author | Thomas White <taw@physics.org> | 2012-02-22 15:38:14 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:38:14 +0100 |
commit | 2d68706307c774f19d217cfbb23296772a7bae1e (patch) | |
tree | 5d48113e953301b1a9582378e51490631bea49be /libcrystfel/src/image.c | |
parent | 5c35542beddaebf6602e17fbc8f55bb8119be411 (diff) |
Fix bounds of image feature number (spotted by Chuck)
Diffstat (limited to 'libcrystfel/src/image.c')
-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; |