Commit Graph

1 Commits

Author SHA1 Message Date
Alex Elder
84f213e584 parser: properly support hexadecimal numbers
In yylex(), when parsing a number, an attempt is made to allow
hexadecimal values to be interpreted if the second character of the
token being parsed is 'x'.  However the parser is only otherwise
permitting digits 0-9 to be used.  Fix this by using isxdigit()
rather than isdigit().

The result still permits nonsensical values to be accepted, but at
least hexidecimal values containing [a-fA-F] will be interpreted
correctly.

Signed-off-by: Alex Elder <elder@linaro.org>
Message-Id: <20211001232338.769309-24-elder@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-10-04 12:30:21 -05:00