summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-10-05 15:42:34 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-10-05 15:42:34 +0000
commit1892a905e615cc7dc7201f992ee2de7727bfeebe (patch)
tree1b3678961c06aaf1e47d30bf5feab5b918252813
parentadf0b1ef531090de4226b9d791477fa913ccad77 (diff)
Tox: truncating tox profile before writing
git-svn-id: http://svn.miranda-ng.org/main/trunk@10701 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/Tox/src/tox_profile.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp
index de1a844234..6fe48686b6 100644
--- a/protocols/Tox/src/tox_profile.cpp
+++ b/protocols/Tox/src/tox_profile.cpp
@@ -80,6 +80,8 @@ void CToxProto::SaveToxProfile()
tox_save(tox, data);
}
+ SetFilePointer(hProfile, 0, 0, FILE_BEGIN);
+ SetEndOfFile(hProfile);
DWORD written = 0;
if (!WriteFile(hProfile, data, size, &written, NULL) || size != written)
{