Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2a1cf72

Browse files
Merge pull request #259 from grobx/arduino/master
Fix hard fault when str is NULL
2 parents 991f076 + cd9cbad commit 2a1cf72

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/utility/BLEUuid.cpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ BLEUuid::BLEUuid(const char * str) :
3030
memset(_data, 0x00, sizeof(_data));
3131

3232
_length = 0;
33+
34+
if (str == NULL) {
35+
return;
36+
}
37+
3338
for (int i = strlen(str) - 1; i >= 0 && _length < BLE_UUID_MAX_LENGTH; i -= 2) {
3439
if (str[i] == '-') {
3540
i++;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /