Commit a5fbcdbd authored by mathiasap's avatar mathiasap Committed by Ken A. Redergård
Browse files

Fixes runtime error for test debug build (#179)

parent f7afa8de
...@@ -264,8 +264,8 @@ std::string createRandomAdvertisingName(const std::string &prefix, const uint8_t ...@@ -264,8 +264,8 @@ std::string createRandomAdvertisingName(const std::string &prefix, const uint8_t
std::copy(prefix.begin(), prefix.end(), std::back_inserter(data)); std::copy(prefix.begin(), prefix.end(), std::back_inserter(data));
const auto randomLength = length - prefix.length(); const auto randomLength = length - prefix.length();
std::generate_n(std::back_inserter(data), randomLength, [] { std::generate_n(std::back_inserter(data), randomLength, [] {
char c; uint8_t c;
while (!std::isalnum(c = static_cast<char>(std::rand()))) while (!std::isalnum(c = static_cast<uint8_t>(std::rand())))
; ;
return c; return c;
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment