Skip to content
Snippets Groups Projects
Commit 35de01dc authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1999-08-02 09:47:18 by simonmar]

oops, 'g' and 'h' aren't hex digits.
parent 90d01008
No related branches found
No related tags found
No related merge requests found
......@@ -703,8 +703,8 @@ readNum cont buf is_digit base conv = read buf 0
is_hexdigit c
= is_digit c
|| (c `geChar#` 'a'# && c `leChar#` 'h'#)
|| (c `geChar#` 'A'# && c `leChar#` 'H'#)
|| (c `geChar#` 'a'# && c `leChar#` 'f'#)
|| (c `geChar#` 'A'# && c `leChar#` 'F'#)
hex c | is_digit c = ord# c -# ord# '0'#
| otherwise = ord# (to_lower c) -# ord# 'a'# +# 10#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment