summaryrefslogtreecommitdiff
path: root/protocols/Steam
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-05-28 12:51:13 +0000
committerRobert Pösel <robyer@seznam.cz>2014-05-28 12:51:13 +0000
commitb64e6827f700f296faf60c1f370e4e319ec755a5 (patch)
tree2a7df0c2fa789b9d34dd3ea973246f032845c54e /protocols/Steam
parent2760f36689ec4b0d53e8d24e383c54f80019c5f4 (diff)
Steam: Fixed iterating over json arrays
git-svn-id: http://svn.miranda-ng.org/main/trunk@9332 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Steam')
-rw-r--r--protocols/Steam/src/Steam/friend.h2
-rw-r--r--protocols/Steam/src/Steam/friend_list.h2
-rw-r--r--protocols/Steam/src/Steam/poll.h2
-rw-r--r--protocols/Steam/src/Steam/search.h4
4 files changed, 5 insertions, 5 deletions
diff --git a/protocols/Steam/src/Steam/friend.h b/protocols/Steam/src/Steam/friend.h
index 00aceab272..a2c7780551 100644
--- a/protocols/Steam/src/Steam/friend.h
+++ b/protocols/Steam/src/Steam/friend.h
@@ -86,7 +86,7 @@ namespace SteamWebApi
root = json_as_array(node);
if (root != NULL)
{
- for (int i = 0;; i++)
+ for (size_t i = 0; i < json_size(root); i++)
{
child = json_at(root, i);
if (child == NULL)
diff --git a/protocols/Steam/src/Steam/friend_list.h b/protocols/Steam/src/Steam/friend_list.h
index a7defd8b8e..80944f8ffe 100644
--- a/protocols/Steam/src/Steam/friend_list.h
+++ b/protocols/Steam/src/Steam/friend_list.h
@@ -63,7 +63,7 @@ namespace SteamWebApi
root = json_as_array(node);
if (root != NULL)
{
- for (int i = 0;; i++)
+ for (size_t i = 0; i < json_size(root); i++)
{
child = json_at(root, i);
if (child == NULL)
diff --git a/protocols/Steam/src/Steam/poll.h b/protocols/Steam/src/Steam/poll.h
index c6f40cf749..42efeff8f1 100644
--- a/protocols/Steam/src/Steam/poll.h
+++ b/protocols/Steam/src/Steam/poll.h
@@ -129,7 +129,7 @@ namespace SteamWebApi
root = json_as_array(node);
if (root != NULL)
{
- for (int i = 0;; i++)
+ for (size_t i = 0; i < json_size(root); i++)
{
child = json_at(root, i);
if (child == NULL)
diff --git a/protocols/Steam/src/Steam/search.h b/protocols/Steam/src/Steam/search.h
index 9ac4afcd4f..1efe0e807b 100644
--- a/protocols/Steam/src/Steam/search.h
+++ b/protocols/Steam/src/Steam/search.h
@@ -53,7 +53,7 @@ namespace SteamWebApi
if ((searchResult->status = (HTTP_STATUS)response->resultCode) != HTTP_STATUS_OK)
return;
- JSONNODE *root = json_parse(response->pData), *node, *child;;
+ JSONNODE *root = json_parse(response->pData), *node, *child;
node = json_get(root, "success");
searchResult->success = json_as_bool(node) > 0;
@@ -73,7 +73,7 @@ namespace SteamWebApi
root = json_as_array(node);
if (root != NULL)
{
- for (int i = 0;; i++)
+ for (size_t i = 0; i < json_size(root); i++)
{
child = json_at(root, i);
if (child == NULL)