mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fix #863
This commit is contained in:
parent
cf475bcb50
commit
ff813bf99d
1 changed files with 1 additions and 1 deletions
|
@ -3775,7 +3775,7 @@ inline std::string random_string(size_t length) {
|
|||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
"abcdefghijklmnopqrstuvwxyz";
|
||||
const size_t max_index = (sizeof(charset) - 1);
|
||||
return charset[static_cast<size_t>(rand()) % max_index];
|
||||
return charset[static_cast<size_t>(std::rand()) % max_index];
|
||||
};
|
||||
std::string str(length, 0);
|
||||
std::generate_n(str.begin(), length, randchar);
|
||||
|
|
Loading…
Reference in a new issue