diff options
author | Tor Andersson <tor@ghostscript.com> | 2008-09-28 23:37:34 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2008-09-28 23:37:34 +0200 |
commit | cbb927639836734ebdd7e5d7d2f9eb8a03bea433 (patch) | |
tree | e498e8dcf43056ddedc85e7009df3ef25f43e241 | |
parent | 99ad913bda74eec0368f3787076d972d39192b5f (diff) | |
download | mupdf-cbb927639836734ebdd7e5d7d2f9eb8a03bea433.tar.xz |
Simplified error handling logic.
-rw-r--r-- | mupdf/pdf_cmap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mupdf/pdf_cmap.c b/mupdf/pdf_cmap.c index 4219f695..1c470051 100644 --- a/mupdf/pdf_cmap.c +++ b/mupdf/pdf_cmap.c @@ -601,11 +601,14 @@ static int codefromstring(unsigned char *buf, int len) static fz_error *lexcmap(pdf_token_e *tok, fz_stream *file, char *buf, int n, int *sl) { fz_error *error; + error = pdf_lex(tok, file, buf, n, sl); - if (!error && *tok == PDF_TKEYWORD) - *tok = tokenfromkeyword(buf); if (error) return fz_rethrow(error, "cannot parse cmap token"); + + if (*tok == PDF_TKEYWORD) + *tok = tokenfromkeyword(buf); + return fz_okay; } |