Index: src/utils.cc |
diff --git a/src/utils.cc b/src/utils.cc |
index 08ee16ff26800a019ecc56e04d73aa857a354ace..374385b67b1f1799a08efc1a3f5b10db5b09c2c0 100644 |
--- a/src/utils.cc |
+++ b/src/utils.cc |
@@ -40,6 +40,7 @@ namespace internal { |
// Implementation is from "Hacker's Delight" by Henry S. Warren, Jr., |
// figure 3-3, page 48, where the function is called clp2. |
uint32_t RoundUpToPowerOf2(uint32_t x) { |
+ ASSERT(x <= 0x80000000u); |
x = x - 1; |
x = x | (x >> 1); |
x = x | (x >> 2); |