diff options
author | HampusM <hampus@hampusmat.com> | 2022-05-17 13:51:45 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-05-17 14:02:36 +0200 |
commit | 287e2f98ee2418305d1377183a1792d6f46dbee9 (patch) | |
tree | 8e3973e29dd018dc94a95d4be1bb56591e862fb0 /minion | |
parent | 1a0264a5259193e977101533342a6684d226626e (diff) |
fix(minion): remove double quotes from end of wifi module IP address
Diffstat (limited to 'minion')
-rw-r--r-- | minion/src/wifi_module.cpp | 4 |
1 files 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<char>(strlen(local_ip_out)); + auto *buf = util::malloc<char>(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) { |