From 1892a905e615cc7dc7201f992ee2de7727bfeebe Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sun, 5 Oct 2014 15:42:34 +0000 Subject: Tox: truncating tox profile before writing git-svn-id: http://svn.miranda-ng.org/main/trunk@10701 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_profile.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'protocols/Tox') 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) { -- cgit v1.2.3