From 82173f354e36e9dad4a7db49a61a4eebcef95ccf Mon Sep 17 00:00:00 2001 From: Nick Winans Date: Sat, 30 Jan 2021 15:47:11 -0600 Subject: [PATCH] fix(core): Assert BLE device name is correct length --- app/src/ble.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/ble.c b/app/src/ble.c index c51391cb..b15a079e 100644 --- a/app/src/ble.c +++ b/app/src/ble.c @@ -63,6 +63,8 @@ static uint8_t active_profile; #define DEVICE_NAME CONFIG_BT_DEVICE_NAME #define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1) +BUILD_ASSERT(DEVICE_NAME_LEN <= 16, "ERROR: BLE device name is too long. Max length: 16"); + #define IS_HOST_PERIPHERAL \ (!IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)) #define IS_SPLIT_PERIPHERAL \