From 8a4095b40566634a17912e10f1cc041c96f0d162 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Thu, 27 Feb 2014 09:56:06 +0000 Subject: [PATCH] [trunk] add a sentinel in debug code --- src/lib/openjp2/j2k.c | 1 + 1 file changed, 1 insertion(+) 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) {