Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Donald Chen
pc-ble-driver-sd_api_v6
Commits
a5fbcdbd
Commit
a5fbcdbd
authored
Dec 14, 2018
by
mathiasap
Committed by
Ken A. Redergård
Dec 14, 2018
Browse files
Fixes runtime error for test debug build (#179)
parent
f7afa8de
Changes
1
Show whitespace changes
Inline
Side-by-side
test/util/src/test_util.cpp
View file @
a5fbcdbd
...
...
@@ -264,8 +264,8 @@ std::string createRandomAdvertisingName(const std::string &prefix, const uint8_t
std
::
copy
(
prefix
.
begin
(),
prefix
.
end
(),
std
::
back_inserter
(
data
));
const
auto
randomLength
=
length
-
prefix
.
length
();
std
::
generate_n
(
std
::
back_inserter
(
data
),
randomLength
,
[]
{
char
c
;
while
(
!
std
::
isalnum
(
c
=
static_cast
<
char
>
(
std
::
rand
())))
uint8_t
c
;
while
(
!
std
::
isalnum
(
c
=
static_cast
<
uint8_t
>
(
std
::
rand
())))
;
return
c
;
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment