Issue 5381: fix regression in pure python code path, Issue 5584: fix a decoder bug for unicode float literals outside of a container
diff --git a/Modules/_json.c b/Modules/_json.c
index 0354a9b..0e30469 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -1468,7 +1468,7 @@
     if (idx < end_idx && str[idx] == '.' && str[idx + 1] >= '0' && str[idx + 1] <= '9') {
         is_float = 1;
         idx += 2;
-        while (idx < end_idx && str[idx] >= '0' && str[idx] <= '9') idx++;
+        while (idx <= end_idx && str[idx] >= '0' && str[idx] <= '9') idx++;
     }
 
     /* if the next char is 'e' or 'E' then maybe read the exponent (or backtrack) */