summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-11-28 12:31:58 +0000
committerRobert Pösel <robyer@seznam.cz>2014-11-28 12:31:58 +0000
commitebe8a6f97999645de9f80fe2a400f3f285e04002 (patch)
tree584e20934a52221f582675969a24649a846bec4a /protocols
parentc602f1813c094cf5b355867ee253a9ad4ef3c147 (diff)
Facebook: Fix utils::text::replace_all method to not result in infinite loop for some inputs
This fixes problem with not showing notifications at all when "show notifications in special chatrooms" is enabled and notification with "%" inside is showed (and same problem for multi user chat messages) git-svn-id: http://svn.miranda-ng.org/main/trunk@11128 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/FacebookRM/src/utils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/utils.cpp b/protocols/FacebookRM/src/utils.cpp
index 39ab01e2a0..38bde17e73 100644
--- a/protocols/FacebookRM/src/utils.cpp
+++ b/protocols/FacebookRM/src/utils.cpp
@@ -3,7 +3,7 @@
Facebook plugin for Miranda Instant Messenger
_____________________________________________
-Copyright © 2009-11 Michal Zelinka, 2011-13 Robert Pösel
+Copyright � 2009-11 Michal Zelinka, 2011-13 Robert P�sel
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -58,7 +58,7 @@ DWORD utils::time::fix_timestamp(unsigned __int64 mili_timestamp)
{
// If it is really mili_timestamp
if (mili_timestamp > 100000000000) {
- return (DWORD) (mili_timestamp / 1000);
+ mili_timestamp /= 1000;
}
return (DWORD) mili_timestamp;
}
@@ -113,7 +113,7 @@ void utils::text::replace_all(std::string* data, const std::string &from, const
while ((position = data->find(from, position)) != std::string::npos)
{
data->replace(position, from.size(), to);
- position++;
+ position += to.size();
}
}