mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 02:12:45 +01:00
Fix off-by-one error putting null char into filepath
This commit is contained in:
parent
c5e6709643
commit
5f5afac574
@ -101,7 +101,7 @@ private:
|
|||||||
"0123456789"
|
"0123456789"
|
||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
"abcdefghijklmnopqrstuvwxyz";
|
"abcdefghijklmnopqrstuvwxyz";
|
||||||
std::uniform_int_distribution<size_t> dist(0u, alphanum.size());
|
std::uniform_int_distribution<size_t> dist(0u, alphanum.size() - 1);
|
||||||
std::string res;
|
std::string res;
|
||||||
res.reserve(len);
|
res.reserve(len);
|
||||||
std::generate_n(std::back_inserter(res), len, [&]() {
|
std::generate_n(std::back_inserter(res), len, [&]() {
|
||||||
|
Loading…
Reference in New Issue
Block a user