Skip to content

Commit

Permalink
Fix snprintf format error
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-apple committed Oct 16, 2020
1 parent d2295a1 commit 5b99ac9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ constexpr const char * kDeviceAddressKeyPrefix = "DeviceAddress";
do \
{ \
const size_t len = strlen(keyPrefix); \
char key[len + sizeof(NodeId) + 1]; \
snprintf(key, sizeof(key), "%s%llx", keyPrefix, node); \
char key[len + 2 * sizeof(NodeId) + 1]; \
snprintf(key, sizeof(key), "%s%" PRIx64, keyPrefix, node); \
action; \
} while (0)

Expand Down

0 comments on commit 5b99ac9

Please sign in to comment.