From 2d68706307c774f19d217cfbb23296772a7bae1e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 22 Feb 2012 15:38:14 +0100 Subject: Fix bounds of image feature number (spotted by Chuck) --- libcrystfel/src/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcrystfel/src/image.c') 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; -- cgit v1.2.3