diff options
| author | George Hazan <george.hazan@gmail.com> | 2024-06-03 14:32:00 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2024-06-03 14:32:00 +0300 |
| commit | 9b2c5d67f7f00eed319116d99895510e5d5c922e (patch) | |
| tree | 6007bb7a1580c91132737b427cf8c5674b97f0df /protocols/ICQ-WIM/src/server.cpp | |
| parent | 2e63945f14636054f435aca9e9d4dd2c032f36e6 (diff) | |
fixes #4447 (ICQ: некоторые картинки не грузятся)
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
| -rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index 54a1d7d52e..c2ef85ff90 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -175,14 +175,8 @@ IcqFileInfo *CIcqProto::RetrieveFileInfo(MCONTACT hContact, const CMStringW &wsz bool CIcqProto::CheckFile(MCONTACT hContact, CMStringW &wszText, IcqFileInfo *&pFileInfo)
{
- bool bRet;
CMStringW wszUrl;
- int idx = wszText.Find(' ');
- if (idx == -1)
- bRet = fileText2url(wszText, &wszUrl);
- else
- bRet = fileText2url(wszText.Mid(0, idx), &wszUrl);
- if (!bRet)
+ if (!fileText2url(wszText, &wszUrl))
return false;
pFileInfo = nullptr;
@@ -192,9 +186,9 @@ bool CIcqProto::CheckFile(MCONTACT hContact, CMStringW &wszText, IcqFileInfo *&p if (!pFileInfo)
return false;
- if (idx != -1) {
- pFileInfo->szOrigUrl = wszText.Mid(0, idx);
- wszText.Delete(0, idx + 1);
+ if (wszUrl != wszText) {
+ pFileInfo->szOrigUrl = wszUrl;
+ wszText.Delete(0, wszUrl.GetLength() + 1);
}
else {
pFileInfo->szOrigUrl = wszText;
|
