mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
win: avoid warning on return of base::RandGenerator
Else, d:\src\crashpad\crashpad\util\net\http_multipart_builder.cc(50) : warning C4244: 'initializing' : conversion from 'uint64_t' to 'int', possible loss of data R=mark@chromium.org BUG=crashpad:1 Review URL: https://codereview.chromium.org/796643006
This commit is contained in:
parent
db6492e154
commit
3eeae10ebe
@ -46,7 +46,7 @@ std::string GenerateBoundaryString() {
|
|||||||
for (int index = 0; index < 32; ++index) {
|
for (int index = 0; index < 32; ++index) {
|
||||||
const char kCharacters[] =
|
const char kCharacters[] =
|
||||||
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||||
int random_value = base::RandGenerator(strlen(kCharacters));
|
int random_value = base::RandInt(0, strlen(kCharacters) - 1);
|
||||||
boundary_string += kCharacters[random_value];
|
boundary_string += kCharacters[random_value];
|
||||||
}
|
}
|
||||||
boundary_string += "---";
|
boundary_string += "---";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user