8000 Fix BLEUUID toString (#3289) · s00500/arduino-esp32@71e3d51 · GitHub
[go: up one dir, main page]

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

Appearance settings

Commit 71e3d51

Browse files
tanakamasayukime-no-dev
authored andcommitted
Fix BLEUUID toString (espressif#3289)
uuid16 is Missing first 4 characters. uuid is Missing last 2 characters.
1 parent 64cfb33 commit 71e3d51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/BLE/src/BLEUUID.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ std::string BLEUUID::toString() {
352352
// If the UUIDs are 16 or 32 bit, pad correctly.
353353

354354
if (m_uuid.len == ESP_UUID_LEN_16) { // If the UUID is 16bit, pad correctly.
355-
char hex[5];
356-
snprintf(hex, sizeof(hex), "%04x", m_uuid.uuid.uuid16);
355+
char hex[9];
356+
snprintf(hex, sizeof(hex), "%08x", m_uuid.uuid.uuid16);
357357
return std::string(hex) + "-0000-1000-8000-00805f9b34fb";
358358
} // End 16bit UUID
359359

0 commit comments

Comments
 (0)
0