From b0d3080ffe39f5fe029ee2d4938ce7a794d76140 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Fri, 4 Jun 2021 11:03:24 -0400 Subject: [PATCH] Resolve clang warning. --- pdfio-token.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdfio-token.c b/pdfio-token.c index f7c1deb..a9e6214 100644 --- a/pdfio-token.c +++ b/pdfio-token.c @@ -421,9 +421,9 @@ _pdfioTokenRead(_pdfio_token_t *tb, // I - Token buffer/stack return (false); } else if (isdigit(tch)) - ch = (char)((ch << 4) | (tch - '0')); + ch = ((ch & 255) << 4) | (tch - '0'); else - ch = (char)((ch << 4) | (tolower(tch) - 'a' + 10)); + ch = ((ch & 255) << 4) | (tolower(tch) - 'a' + 10); } }