diff options
author | George Hazan <ghazan@miranda.im> | 2023-04-18 18:00:36 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-04-18 18:00:36 +0300 |
commit | dc393727875fa66e87433f48b9f43a9cba47528c (patch) | |
tree | 3776be1416997800606e2dbafa37e2b21e580ca0 /protocols | |
parent | b8eb4f622b7e839454081f9dede6b9a42d174f75 (diff) |
fixes #3489 (Tox: delete spaces from Tox ID in contact search)
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Tox/src/tox_search.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Tox/src/tox_search.cpp b/protocols/Tox/src/tox_search.cpp index 96f3de2dc6..9b398e1fd8 100644 --- a/protocols/Tox/src/tox_search.cpp +++ b/protocols/Tox/src/tox_search.cpp @@ -86,7 +86,8 @@ HANDLE CToxProto::OnSearchAdvanced(HWND owner) wchar_t text[MAX_PATH];
GetDlgItemText(owner, IDC_SEARCH, text, _countof(text));
- const std::string query = T2Utf(text).str();
+ std::string query = T2Utf(text).str();
+ query = std::regex_replace(query, std::regex("\\s"), "");
if (std::regex_search(query, match, regex)) {
PROTOSEARCHRESULT psr = { sizeof(psr) };
psr.flags = PSR_UTF8;
|