Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yhirose committed Feb 17, 2021
1 parent cf475bc commit ff813bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ff813bf

Please sign in to comment.