diff options
author | George Hazan <george.hazan@gmail.com> | 2014-12-05 14:50:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-12-05 14:50:31 +0000 |
commit | ae10177eb1e515eada4aa2b4295aab02d1f7c176 (patch) | |
tree | a42597711316c7a9757e3598c48cf76c3fdf4a72 /protocols/IcqOscarJ/src/icq_rates.cpp | |
parent | 8961403e3a5002fd284422f8c6ec5a78fdd81816 (diff) |
warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11251 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_rates.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_rates.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/protocols/IcqOscarJ/src/icq_rates.cpp b/protocols/IcqOscarJ/src/icq_rates.cpp index 5c2f857bbd..5d4c5740cd 100644 --- a/protocols/IcqOscarJ/src/icq_rates.cpp +++ b/protocols/IcqOscarJ/src/icq_rates.cpp @@ -76,18 +76,21 @@ rates::rates(CIcqProto *ppro, BYTE *pBuffer, size_t wLen) // Parse Group associated pairs
for (i = 0; i < wCount; i++) {
rates_group *pGroup = &groups[i];
- WORD wNum;
- if (wLen < 4) break;
+ if (wLen < 4)
+ break;
+
pBuffer += 2; // Group ID
+ WORD wNum;
unpackWord(&pBuffer, &wNum);
wLen -= 4;
- if (wLen < wNum * 4) break;
+ if (wLen < (size_t)wNum * 4)
+ break;
+
pGroup->nPairs = wNum;
pGroup->pPairs = (WORD*)SAFE_MALLOC(wNum * 4);
- for (int n = 0; n < wNum * 2; n++) {
+ for (size_t n = 0; n < (size_t)wNum * 2; n++) {
WORD wItem;
-
unpackWord(&pBuffer, &wItem);
pGroup->pPairs[n] = wItem;
}
|