diff --git a/simplejson/_speedups.c b/simplejson/_speedups.c
index ddc252a6b1ecc852cc543916d0c32cbce23937e0_c2ltcGxlanNvbi9fc3BlZWR1cHMuYw==..ce30278b5a698bf2684ceaa9b21e7f8d98738123_c2ltcGxlanNvbi9fc3BlZWR1cHMuYw== 100644
--- a/simplejson/_speedups.c
+++ b/simplejson/_speedups.c
@@ -1208,4 +1208,5 @@
                 end += 6;
                 /* Decode 4 hex digits */
                 for (; next < end; next++) {
+                    JSON_UNICHR digit = PyUnicode_READ(kind, buf, next);
                     c2 <<= 4;
@@ -1211,5 +1212,4 @@
                     c2 <<= 4;
-                    JSON_UNICHR digit = PyUnicode_READ(kind, buf, next);
                     switch (digit) {
                         case '0': case '1': case '2': case '3': case '4':
                         case '5': case '6': case '7': case '8': case '9':