Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: src/base/utils/random-number-generator.cc

Issue 597993002: Fix argument check in RandomNumberGenerator::NextInt. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/utils/random-number-generator.cc
diff --git a/src/base/utils/random-number-generator.cc b/src/base/utils/random-number-generator.cc
index 94549360dd23376b3cc9bfa19314970364ac6d50..a1ec9d71842766d4cb0f51962e05c4c7aae00f32 100644
--- a/src/base/utils/random-number-generator.cc
+++ b/src/base/utils/random-number-generator.cc
@@ -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)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698