From 45740042bc0bb2b7c7a5f2ac47ea2516f5aff6d0 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Fri, 14 Jul 2023 23:43:45 +0800 Subject: [PATCH] [Ameba] [wifi] fix ssid and password length after getting from nvs (#27883) * [wifi] fix ssid and password length after getting from nvs * Restyled by clang-format --------- Co-authored-by: Restyled.io --- src/platform/Ameba/AmebaUtils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/Ameba/AmebaUtils.cpp b/src/platform/Ameba/AmebaUtils.cpp index 12118dfb14e9f3..db97f98782d735 100644 --- a/src/platform/Ameba/AmebaUtils.cpp +++ b/src/platform/Ameba/AmebaUtils.cpp @@ -108,8 +108,8 @@ CHIP_ERROR AmebaUtils::GetWiFiConfig(rtw_wifi_config_t * config) &credentialsLen); SuccessOrExit(err); - config->ssid_len = ssidLen; - config->password_len = credentialsLen; + config->ssid_len = strlen((const char *) config->ssid); + config->password_len = strlen((const char *) config->password); exit: return err;