diff --git a/pdf.c b/pdf.c index 1e55c3fcdc5d5fd8440bfd9084ab6353777e970f..b9b0c05607979f7759150460c63c92fb355e5efe 100644 --- a/pdf.c +++ b/pdf.c @@ -482,8 +482,8 @@ act_a85partial3group(const HParseResult *p, void *u) // 2 bytes output uint8_t *bytes = h_arena_malloc(p->arena, sizeof(uint8_t) * 2); - for (int i=0; i<4; i++) { - assert(digits[i]->token_type == TT_SEQUENCE); // XXX assert fails on test input A85(Hello, World!a) -> 87cURD_*#4DfTZ)+^k~> + for (int i=0; i<3; i++) { + assert(digits[i]->token_type == TT_SEQUENCE); fourbytes = fourbytes * 85 + H_CAST_UINT(digits[i]->seq->elements[0]); } @@ -531,7 +531,7 @@ act_a85partial4group(const HParseResult *p, void *u) bytes[1] = (fourbytes & 0x00FF0000) >> 16; bytes[2] = (fourbytes & 0x0000FF00) >> 8; - fprintf(stdout, "act_a85partial4group: %4x (%d) ==> %2x %2x \n", fourbytes, fourbytes, bytes[0], bytes[1], bytes[2]); // XXX debug + fprintf(stdout, "act_a85partial4group: %4x (%d) ==> %2x %2x %2x\n", fourbytes, fourbytes, bytes[0], bytes[1], bytes[2]); // XXX debug return H_MAKE_BYTES(bytes, 3); }