aboutsummaryrefslogtreecommitdiffstats
path: root/src/jbig.c
diff options
context:
space:
mode:
authoryzrh <yzrh@noema.org>2022-12-30 12:20:49 +0000
committeryzrh <yzrh@noema.org>2022-12-30 15:04:32 +0000
commit226f16ddf41619caea347228322851835b4d1045 (patch)
tree3ebe081c6e603c2471d542dac871130fba271179 /src/jbig.c
parent9646ee61c355a97ad47d20ec3e3d77bceee34b07 (diff)
downloadmelon-226f16ddf41619caea347228322851835b4d1045.tar.gz
melon-226f16ddf41619caea347228322851835b4d1045.tar.zst
Handle HN page with figure only.
Signed-off-by: yzrh <yzrh@noema.org>
Diffstat (limited to 'src/jbig.c')
-rw-r--r--src/jbig.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jbig.c b/src/jbig.c
index fce8e02..b466411 100644
--- a/src/jbig.c
+++ b/src/jbig.c
@@ -108,7 +108,7 @@ static void
_bytein(void)
{
if (_ret_pos < _scd_size)
- _reg_c += *(_scd + _ret_pos++) << 8;
+ _reg_c += _scd[_ret_pos++] << 8;
_ct = 8;
}
@@ -215,19 +215,19 @@ _procline(int line, char *a, char *b, char *c)
cx >>= 1;
if (_pix == 1) {
- *(_ret + _width_padded * (_height - line - 1) + i / 8) |= _pix << (7 - (i & 0x07));
- *(c + i) = 1;
+ _ret[_width_padded * (_height - line - 1) + i / 8] |= _pix << (7 - (i & 0x07));
+ c[i] = 1;
cx |= 0x0200;
} else {
cx &= 0xfdff;
}
- if (i + 2 < _width && *(a + i + 2) == 1)
+ if (i + 2 < _width && a[i + 2] == 1)
cx |= 0x0004;
else
cx &= 0xfffb;
- if (i + 3 < _width && *(b + i + 3) == 1)
+ if (i + 3 < _width && b[i + 3] == 1)
cx |= 0x0080;
else
cx &= 0xff7f;