From b5828692080d87255f5b12424cc205654f0240b2 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Wed, 8 Aug 2012 18:10:53 +0200 Subject: Added enum DEVICE_COUNT and IMAGE_COUNT, Added function device_to_long_string --- src/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/image.c') diff --git a/src/image.c b/src/image.c index a26a172..b5a7576 100644 --- a/src/image.c +++ b/src/image.c @@ -467,7 +467,7 @@ enum image_type image_type_from_string(const char * type) { const char * image_type_to_string(enum image_type type) { - if ( type > sizeof(image_types) ) + if ( type > sizeof(image_types)/sizeof(image_types[0]) ) return NULL; return image_types[type]; -- cgit v1.2.3