diff --git a/glib/tests/checksum.c b/glib/tests/checksum.c index a58d8a040..eb170e2fc 100644 --- a/glib/tests/checksum.c +++ b/glib/tests/checksum.c @@ -619,9 +619,23 @@ hexval (const gchar c) { switch (c) { - case '0' ... '9': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': return c - '0'; - case 'a' ... 'f': + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': return 10 + c - 'a'; default: return 0;