diff --git a/src/slic3r/GUI/MediaFilePanel.cpp b/src/slic3r/GUI/MediaFilePanel.cpp index a86d42ff0..66cd3a29d 100644 --- a/src/slic3r/GUI/MediaFilePanel.cpp +++ b/src/slic3r/GUI/MediaFilePanel.cpp @@ -410,7 +410,7 @@ void MediaFilePanel::modeChanged(wxCommandEvent& e1) m_last_mode = mode; } -extern wxString hide_passwd(wxString url, std::vector const &passwords); +extern wxString hide_passwd(wxString url, std::vector const &passwords); void MediaFilePanel::fetchUrl(boost::weak_ptr wfs) { diff --git a/src/slic3r/GUI/MediaPlayCtrl.cpp b/src/slic3r/GUI/MediaPlayCtrl.cpp index ee93b50d9..ae60650f4 100644 --- a/src/slic3r/GUI/MediaPlayCtrl.cpp +++ b/src/slic3r/GUI/MediaPlayCtrl.cpp @@ -139,15 +139,18 @@ void MediaPlayCtrl::SetMachineObject(MachineObject* obj) SetStatus("", false); } -wxString hide_passwd(wxString url, std::vector const &passwords) +wxString hide_passwd(wxString url, std::vector const &passwords) { for (auto &p : passwords) { auto i = url.find(p); + if (i == wxString::npos) + continue; auto j = i + p.length(); if (p[p.length() - 1] == '=') { i = j; j = url.find('&', i); - if (j == wxString::npos) j = url.length(); + if (j == wxString::npos) + j = url.length(); } auto l = size_t(j - i); if (j == url.length() || url[j] == '@' || url[j] == '&') diff --git a/src/slic3r/GUI/Printer/PrinterFileSystem.cpp b/src/slic3r/GUI/Printer/PrinterFileSystem.cpp index e8f451899..adb459a95 100644 --- a/src/slic3r/GUI/Printer/PrinterFileSystem.cpp +++ b/src/slic3r/GUI/Printer/PrinterFileSystem.cpp @@ -1218,7 +1218,7 @@ void PrinterFileSystem::HandleResponse(boost::unique_lock &l, Bamb } namespace Slic3r { namespace GUI { - extern wxString hide_passwd(wxString url, std::vector const &passwords); + extern wxString hide_passwd(wxString url, std::vector const &passwords); }} void PrinterFileSystem::Reconnect(boost::unique_lock &l, int result)