From 287e2f98ee2418305d1377183a1792d6f46dbee9 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 17 May 2022 13:51:45 +0200 Subject: fix(minion): remove double quotes from end of wifi module IP address --- minion/src/wifi_module.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minion/src/wifi_module.cpp b/minion/src/wifi_module.cpp index ea509df..352cb79 100644 --- a/minion/src/wifi_module.cpp +++ b/minion/src/wifi_module.cpp @@ -183,7 +183,7 @@ auto WiFiModule::get_local_ip(char *local_ip_out) noexcept -> const char * return local_ip_out; } - auto *buf = util::malloc(strlen(local_ip_out)); + auto *buf = util::malloc(strlen(local_ip_out) + 1U); if (buf == nullptr) { @@ -208,7 +208,7 @@ auto WiFiModule::get_local_ip(char *local_ip_out) noexcept -> const char * return local_ip_out; } - const auto local_ip_end = strstr(buf, "\r\n+CIFSR:STAMAC"); + auto local_ip_end = strstr(buf, "\"\r\n+CIFSR:STAMAC"); if (local_ip_end == nullptr) { -- cgit v1.2.3-18-g5258