summaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2013-01-05 12:11:03 +0100
committerPali Rohár <pali.rohar@gmail.com>2013-01-05 12:11:03 +0100
commite362f3cab9b58af81db4177104eacd806febf2c9 (patch)
treea3ee7a90f431cd8b384810d4ff46ea65171a7b38 /src/image.c
parent9ea9bea09681270de9922eddcbc111dcbdac077d (diff)
download0xFFFF-e362f3cab9b58af81db4177104eacd806febf2c9.tar.bz2
Fix crashing when accessing out of global arrays
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/image.c b/src/image.c
index 5f86e3b..994e3d0 100644
--- a/src/image.c
+++ b/src/image.c
@@ -540,7 +540,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)/sizeof(image_types[0]) )
+ if ( type >= sizeof(image_types)/sizeof(image_types[0]) )
return NULL;
return image_types[type];