From 733e67e80d1df1045b5c8a2c9ca5131a096cc248 Mon Sep 17 00:00:00 2001 From: Michael Hamburg Date: Wed, 4 Oct 2017 15:29:02 -0700 Subject: [PATCH] whoops, bad hex decoder --- test/ristretto.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ristretto.cxx b/test/ristretto.cxx index dc4edde..5e6bc42 100644 --- a/test/ristretto.cxx +++ b/test/ristretto.cxx @@ -14,9 +14,9 @@ using namespace decaf; inline int hexi(char c) { - if (c >= '0' && c < '9') return c-'0'; - if (c >= 'a' && c < 'f') return c-'a'+0xa; - if (c >= 'A' && c < 'F') return c-'A'+0xa; + if (c >= '0' && c <= '9') return c-'0'; + if (c >= 'a' && c <= 'f') return c-'a'+0xa; + if (c >= 'A' && c <= 'F') return c-'A'+0xa; return -1; }