[trunk] Re-import chunk from r2458 that made textGBR.jp2 to fail otherwise
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 28 Feb 2014 15:27:30 +0000 (15:27 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Fri, 28 Feb 2014 15:27:30 +0000 (15:27 +0000)
Update issue 225

src/lib/openjp2/j2k.c

index 9637b55243ffe37a34c2c9416ab2685f04ca205a..7485e752a26903f949bdb908e4c5e33ff73dfd8a 100644 (file)
@@ -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*/
                         }
                 }