From 6ff4554c66450e63c546776e011850b13c855961 Mon Sep 17 00:00:00 2001 From: Pompolic <pompolic@special-circumstanc.es> Date: Fri, 14 Feb 2020 16:34:58 +0100 Subject: [PATCH] Ignore whitespace between hexdigit and eod + style fixes --- pdf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pdf.c b/pdf.c index 0a1e2a6..ce2d4ed 100644 --- a/pdf.c +++ b/pdf.c @@ -1072,11 +1072,11 @@ ASCIIHexDecode(const Dict *parms, HBytes b, HParser *p) H_ARULE(hupper, h_ch_range('A', 'F')); H_RULE(ahexeod, h_ch('>')); H_RULE(hdigit, CHX(digit, hlower, hupper)); - H_RULE(hdigitpair, SEQ(OPT(h_many(lwchar)),hdigit,OPT(h_many(lwchar)),hdigit)); - H_ARULE(ahextruncated, SEQ(hdigit,ahexeod)); + H_RULE(hdigitpair, SEQ(OPT(h_many(lwchar)), hdigit, OPT(h_many(lwchar)), hdigit)); + H_ARULE(ahextruncated, SEQ(hdigit, OPT(h_many(lwchar)), ahexeod)); H_RULE(hs_end, CHX(hdigitpair, ahextruncated)); - H_RULE(hexstream, SEQ(h_many(hdigitpair),hs_end)); + H_RULE(hexstream, SEQ(h_many(hdigitpair), hs_end)); res = h_parse(hexstream, b.token, b.len); if(!res) @@ -1098,7 +1098,7 @@ ASCII85Decode(const Dict *parms, HBytes b, HParser *p) HParseResult *res; H_RULE(lwchar, IN(LWCHARS)); - H_RULE(a85eod, SEQ(h_ch('~'), OPT(h_many(lwchar)), h_ch('>'))); + H_RULE(a85eod, SEQ(h_ch('~'), OPT(h_many(lwchar)), h_ch('>'))); fprintf(stderr, "ASCII85Decode: not implemented\n"); return NULL; } -- GitLab