summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sqfs/comp/lzo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqfs/comp/lzo.c b/lib/sqfs/comp/lzo.c
index 498c250..46f9301 100644
--- a/lib/sqfs/comp/lzo.c
+++ b/lib/sqfs/comp/lzo.c
@@ -185,7 +185,7 @@ sqfs_compressor_t *lzo_compressor_create(const sqfs_compressor_config_t *cfg)
if (cfg->flags & ~SQFS_COMP_FLAG_GENERIC_ALL)
return NULL;
- if (cfg->opt.lzo.algorithm > LZO_NUM_ALGS ||
+ if (cfg->opt.lzo.algorithm >= LZO_NUM_ALGS ||
lzo_algs[cfg->opt.lzo.algorithm].compress == NULL) {
return NULL;
}