From ebf30ce7c158bb54b21b72cc65a427318ef3c3d5 Mon Sep 17 00:00:00 2001 From: taynpg Date: Thu, 9 Jan 2025 16:58:19 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=AD=A3=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E8=B7=AF=E5=BE=84=E6=9F=A5=E6=89=BEBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- filecomplete.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filecomplete.cpp b/filecomplete.cpp index 83cbecc..0f33694 100644 --- a/filecomplete.cpp +++ b/filecomplete.cpp @@ -136,7 +136,7 @@ std::string file_predict(const char* data) } else { search_key = cur; } - if (cur.find("/") == std::string::npos && cur.find("\\") == std::string::npos) { + if (search_key.find("/") == std::string::npos && search_key.find("\\") == std::string::npos) { for (const auto& item : cur_work_content) { if (item != search_key && item.find(search_key) == 0) { return item.substr(search_key.size(), item.size() - search_key.size());