aboutsummaryrefslogtreecommitdiffstats
path: root/unhex.c
diff options
context:
space:
mode:
Diffstat (limited to 'unhex.c')
-rw-r--r--unhex.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/unhex.c b/unhex.c
index 0dc231d..a84ac19 100644
--- a/unhex.c
+++ b/unhex.c
@@ -14,9 +14,10 @@ void
libsha2_unhex(char *restrict output, const char *restrict hashsum)
{
size_t n = strlen(hashsum) / 2;
+ char a, b;
while (n--) {
- char a = hashsum[2 * n + 0];
- char b = hashsum[2 * n + 1];
+ a = hashsum[2 * n + 0];
+ b = hashsum[2 * n + 1];
a = (char)((a & 15) + (a > '9' ? 9 : 0));
b = (char)((b & 15) + (b > '9' ? 9 : 0));