summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/comp/compressor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/comp/compressor.c b/lib/comp/compressor.c
index 506df46..cc04aa6 100644
--- a/lib/comp/compressor.c
+++ b/lib/comp/compressor.c
@@ -154,7 +154,7 @@ void compressor_print_available(void)
const char *compressor_name_from_id(E_SQFS_COMPRESSOR id)
{
- if (id < 0 || (size_t)id > sizeof(names) / sizeof(names[0]))
+ if (id < 0 || (size_t)id >= sizeof(names) / sizeof(names[0]))
return NULL;
return names[id];