Index: src/utils.h |
diff --git a/src/utils.h b/src/utils.h |
index d8879ac00b46fce28357da24a0bc52356674570f..8b2f1137e0fa708a0701440a048120aedf8ec2d8 100644 |
--- a/src/utils.h |
+++ b/src/utils.h |
@@ -1690,7 +1690,7 @@ bool StringToArrayIndex(Stream* stream, uint32_t* index) { |
d = stream->GetNext() - '0'; |
if (d < 0 || d > 9) return false; |
// Check that the new result is below the 32 bit limit. |
- if (result > 429496729U - ((d > 5) ? 1 : 0)) return false; |
+ if (result > 429496729U - ((d + 3) >> 3)) return false; |
result = (result * 10) + d; |
} |