[jbig2-cvs] rev 366 - trunk

giles at ghostscript.com giles at ghostscript.com
Mon Dec 13 12:00:09 PST 2004


Author: giles
Date: 2004-12-13 12:00:09 -0800 (Mon, 13 Dec 2004)
New Revision: 366

Modified:
   trunk/jbig2_symbol_dict.c
Log:
Fix and error return. The normal 'return jbig2_error(ctx, JBIG2_SEVERITY_FATAL,...)'
idiom doesn't work when the function returns a pointer instead of an error code.


Modified: trunk/jbig2_symbol_dict.c
===================================================================
--- trunk/jbig2_symbol_dict.c	2004-12-08 22:49:47 UTC (rev 365)
+++ trunk/jbig2_symbol_dict.c	2004-12-13 20:00:09 UTC (rev 366)
@@ -387,9 +387,12 @@
 		          code = jbig2_arith_int_decode(IARDY, as, &RDY);
 		      }
 
-		      if (ID >= ninsyms+NSYMSDECODED)
-			return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
+
+		      if (ID >= ninsyms+NSYMSDECODED) {
+			jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
 			  "refinement references unknown symbol %d", ID);
+			return NULL;
+		      }
    
 		      jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
 			"symbol is a refinement of id %d with the refinement applied at (%d,%d)",



More information about the jbig2-cvs mailing list