ref: e552e5440e5e285d7df43789a444ccba5727d642
parent: 539a19a063a962277c04f2c36dbdebc9bad28649
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Wed Oct 1 15:30:10 EDT 2003
Remove an unnecessary check for the symbol id < 0 (it's unsigned) and correct a type mismatch. Both of these may have been causing warnings on MSVC. Thanks to Igor Melichev for tracking down the problem. git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@278 ded80894-8fb9-0310-811b-c03f3676ab4d
--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -211,7 +211,7 @@
} else {
code = jbig2_arith_iaid_decode(IAID, as, &ID);
}
- if (ID < 0 || ID >= max_id) {
+ if (ID >= max_id) {
return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
"symbol id out of range! (%d/%d)", ID, max_id);
}
@@ -218,7 +218,7 @@
/* (3c.v) look up the symbol bitmap IB */
{
- int id = ID;
+ uint32_t id = ID;
index = 0;
while (id >= dicts[index]->n_symbols)