summaryrefslogtreecommitdiff
path: root/protocols/ICQ-WIM/src/utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-07-04 15:39:26 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-07-04 15:39:26 +0300
commit4587283773e8d942a0aee38b5937219a845a78a0 (patch)
tree161adcb770c96becccba8c03286e4c6b382e5d6c /protocols/ICQ-WIM/src/utils.cpp
parenta19f36229e9e131f000161d23e729b1fbca58b3e (diff)
ICQ-WIM: fix for server group parsing
Diffstat (limited to 'protocols/ICQ-WIM/src/utils.cpp')
-rw-r--r--protocols/ICQ-WIM/src/utils.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/protocols/ICQ-WIM/src/utils.cpp b/protocols/ICQ-WIM/src/utils.cpp
index 786c4679f2..10a7874498 100644
--- a/protocols/ICQ-WIM/src/utils.cpp
+++ b/protocols/ICQ-WIM/src/utils.cpp
@@ -311,6 +311,15 @@ void CIcqProto::setId(MCONTACT hContact, const char *szSetting, __int64 iValue)
/////////////////////////////////////////////////////////////////////////////////////////
+void parseGroup(CMStringW &wszGroup)
+{
+ wszGroup.Replace(L">", L"\\");
+ if (wszGroup[0] == '\\')
+ wszGroup.Delete(0, 1);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
char* time2text(time_t time)
{
if (time == 0)
@@ -318,9 +327,10 @@ char* time2text(time_t time)
tm *local = localtime(&time);
if (local) {
- char *str = asctime(local);
- str[24] = '\0'; // remove new line
- return str;
+ if (char *str = asctime(local)) {
+ str[24] = '\0'; // remove new line
+ return str;
+ }
}
return "<invalid>";