summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/openjp2/j2k.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c
index 9637b552..7485e752 100644
--- a/src/lib/openjp2/j2k.c
+++ b/src/lib/openjp2/j2k.c
@@ -4030,7 +4030,7 @@ OPJ_BOOL opj_j2k_read_sot ( opj_j2k_t *p_j2k,
/* If know the number of tile part header we will check if we didn't read the last*/
if (l_tcp->m_nb_tile_parts) {
- if (l_tcp->m_nb_tile_parts == l_current_part) {
+ if (l_tcp->m_nb_tile_parts == (l_current_part+1)) {
p_j2k->m_specific_param.m_decoder.m_can_decode = 1; /* Process the last tile-part header*/
}
}