rev 366 - trunk
[email protected] Mon, 13 Dec 2004 12:00:09 -0800 (PST)
| Newsgroups | gmane.comp.printing.ghostscript.jbig2dec.cvs |
|---|---|
| Message-ID | <[email protected]> |
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 erro=
r code.
Modified: trunk/jbig2_symbol_dict.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 =3D jbig2_arith_int_decode(IARDY, as, &RDY);
}
=20
- if (ID >=3D ninsyms+NSYMSDECODED)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
+
+ if (ID >=3D ninsyms+NSYMSDECODED) {
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
"refinement references unknown symbol %d", ID);
+ return NULL;
+ }
=20
jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
"symbol is a refinement of id %d with the refinement applied at (%d,%=
d)",