mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 18:56:08 +03:00
Fix null termination of wsave_path.
This commit is contained in:
parent
40fc98d354
commit
247c9a85e2
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ void TorrentCreatorThread::run() {
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
wchar_t *wsave_path = new wchar_t[save_path.length()+1];
|
wchar_t *wsave_path = new wchar_t[save_path.length()+1];
|
||||||
int len = save_path.toWCharArray(wsave_path);
|
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);
|
std::ofstream outfile(wsave_path, std::ios_base::out|std::ios_base::binary);
|
||||||
delete[] wsave_path;
|
delete[] wsave_path;
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue