mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
FIX: [STUDIO-4775] fix hide_passwd crash
Change-Id: I32224ee6af9f17cd4c448f519dcff65060ed7216 Jira: STUDIO-4775
This commit is contained in:
parent
63c33c90e6
commit
d6357d12b5
3 changed files with 7 additions and 4 deletions
|
@ -139,15 +139,18 @@ void MediaPlayCtrl::SetMachineObject(MachineObject* obj)
|
|||
SetStatus("", false);
|
||||
}
|
||||
|
||||
wxString hide_passwd(wxString url, std::vector<std::string> const &passwords)
|
||||
wxString hide_passwd(wxString url, std::vector<wxString> 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] == '&')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue