From: Mathieu Malaterre Date: Thu, 27 Feb 2014 09:56:06 +0000 (+0000) Subject: [trunk] add a sentinel in debug code X-Git-Tag: version.2.0.1~4^2~189 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a4095b40566634a17912e10f1cc041c96f0d162;p=openjpeg [trunk] add a sentinel in debug code --- diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c index 11d66a18..924fdd60 100644 --- a/src/lib/openjp2/j2k.c +++ b/src/lib/openjp2/j2k.c @@ -6314,6 +6314,7 @@ void opj_j2k_setup_encoder( opj_j2k_t *p_j2k, if (parameters->csty & J2K_CCP_CSTY_PRT) { OPJ_INT32 p = 0, it_res; + assert( tccp->numresolutions > 0 ); for (it_res = tccp->numresolutions - 1; it_res >= 0; it_res--) { if (p < parameters->res_spec) {