1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Fix null termination of wsave_path.

This commit is contained in:
sledgehammer999 2013-01-26 20:35:50 +02:00
parent ed26846a54
commit 2309c25aa4

View File

@ -132,7 +132,7 @@ void TorrentCreatorThread::run() {
#ifdef _MSC_VER
wchar_t *wsave_path = new wchar_t[save_path.length()+1];
int len = save_path.toWCharArray(wsave_path);
wsave_path[len+1] = '\0';
wsave_path[len] = '\0';
std::ofstream outfile(wsave_path, std::ios_base::out|std::ios_base::binary);
delete[] wsave_path;
#else