From 8508d083487e03f6dd0371ab2c67ec0168c7b746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 22 Dec 2015 11:44:06 +0000 Subject: Steam: Fix indefinite cycle when loading offline messages git-svn-id: http://svn.miranda-ng.org/main/trunk@15929 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_history.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/Steam/src') 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)))); -- cgit v1.2.3