Fix argument check in RandomNumberGenerator::NextInt.
authorneis@chromium.org <neis@chromium.org>
Thu, 25 Sep 2014 08:03:56 +0000 (08:03 +0000)
committerneis@chromium.org <neis@chromium.org>
Thu, 25 Sep 2014 08:03:56 +0000 (08:03 +0000)
R=bmeurer@chromium.org
BUG=

Review URL: https://codereview.chromium.org/597993002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/base/utils/random-number-generator.cc

index 9454936..a1ec9d7 100644 (file)
@@ -79,7 +79,7 @@ RandomNumberGenerator::RandomNumberGenerator() {
 
 
 int RandomNumberGenerator::NextInt(int max) {
-  DCHECK_LE(0, max);
+  DCHECK_LT(0, max);
 
   // Fast path if max is a power of 2.
   if (IS_POWER_OF_TWO(max)) {