Skip to content

Commit

Permalink
Fix off-by-one error putting null char into filepath
Browse files Browse the repository at this point in the history
  • Loading branch information
tsjost committed Oct 12, 2021
1 parent c5e6709 commit 5f5afac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class Temp {
"0123456789"
"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;
res.reserve(len);
std::generate_n(std::back_inserter(res), len, [&]() {
Expand Down

0 comments on commit 5f5afac

Please sign in to comment.