diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-02-10 19:36:17 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-02-10 19:36:17 +0000 |
commit | acbdf5af932c3fc10563bd47216dd7f14f0f5e87 (patch) | |
tree | 949ec8219ddcb370568d82bcf0b345d8db4064da /protocols/Tox/src/tox_avatars.cpp | |
parent | cf0e356099c0f5a76f0c879dd1a15747f7da760c (diff) |
Tox:
- added some debug info logging
- fix for reading big files
git-svn-id: http://svn.miranda-ng.org/main/trunk@12083 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_avatars.cpp')
-rw-r--r-- | protocols/Tox/src/tox_avatars.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Tox/src/tox_avatars.cpp b/protocols/Tox/src/tox_avatars.cpp index 8f4410c5f3..a19f47faf9 100644 --- a/protocols/Tox/src/tox_avatars.cpp +++ b/protocols/Tox/src/tox_avatars.cpp @@ -35,7 +35,7 @@ void CToxProto::SetToxAvatar(std::tstring path, bool checkHash) return;
}*/
- int length;
+ long length;
uint8_t *data;
FILE *hFile = _tfopen(path.c_str(), L"rb");
if (!hFile)
@@ -55,8 +55,8 @@ void CToxProto::SetToxAvatar(std::tstring path, bool checkHash) }
data = (uint8_t*)mir_alloc(length);
- size_t readed = fread(data, sizeof(uint8_t), length, hFile);
- if (readed != length)
+ long read = fread(data, sizeof(uint8_t), length, hFile);
+ if (read != length)
{
fclose(hFile);
debugLogA("CToxProto::SetToxAvatar: failed to read avatar file");
|