diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-03 06:04:07 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-03 06:04:07 +0000 |
commit | 201ced87c58de8ee50cb15562506d700f51d09a1 (patch) | |
tree | 363d487910a8d3c99f040b6acd9ef03e473f457b /protocols/SkypeWeb/src/skype_utils.cpp | |
parent | a50ae784ce7394b2621cf42a28cab7edd31e6c6a (diff) |
fixed timestamp converting
git-svn-id: http://svn.miranda-ng.org/main/trunk@12582 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_utils.cpp')
-rw-r--r-- | protocols/SkypeWeb/src/skype_utils.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index a85f9c9eec..428f778d5b 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -8,7 +8,16 @@ time_t __stdcall CSkypeProto::IsoToUnixTime(const TCHAR *stamp) if (stamp == NULL)
return 0;
- const TCHAR *p = stamp;
+ TCHAR *p = NEWTSTR_ALLOCA(stamp);
+
+ // skip '-' chars
+ int si = 0, sj = 0;
+ while (true) {
+ if (p[si] == _T('-'))
+ si++;
+ else if (!(p[sj++] = p[si++]))
+ break;
+ }
// Get the date part
for (i = 0; *p != '\0' && i < 8 && isdigit(*p); p++, i++)
|