summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2015-12-22 11:44:06 +0000
committerRobert Pösel <robyer@seznam.cz>2015-12-22 11:44:06 +0000
commit8508d083487e03f6dd0371ab2c67ec0168c7b746 (patch)
tree90f944e0342e71d5f52cc37ca25f6658e8199e35 /protocols
parentb28e0f95010e0d4f20ae0b682e5ce590f0eb3d95 (diff)
Steam: Fix indefinite cycle when loading offline messages
git-svn-id: http://svn.miranda-ng.org/main/trunk@15929 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Steam/src/steam_history.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/Steam/src/steam_history.cpp b/protocols/Steam/src/steam_history.cpp
index dc1f746928..d2fe8b4d50 100644
--- a/protocols/Steam/src/steam_history.cpp
+++ b/protocols/Steam/src/steam_history.cpp
@@ -82,9 +82,9 @@ void CSteamProto::OnGotHistoryMessages(const HttpResponse *response, void *arg)
// Self SteamID
ptrA steamId(getStringA("SteamID"));
- for (size_t i = json_size(nmessages) - 1; i >= 0; i--)
+ for (size_t i = json_size(nmessages); i > 0; i--)
{
- JSONNode *message = json_at(nmessages, i);
+ JSONNode *message = json_at(nmessages, i - 1);
node = json_get(message, "accountid");
const char *authorSteamId = AccountIdToSteamId(_ttoi64(ptrT(json_as_string(node))));