Skip to content
Snippets Groups Projects
Commit 13a9fcba authored by Philippe Gorley's avatar Philippe Gorley Committed by Adrien Béraud
Browse files

string_utils: don't add null byte to wide strings

Fixes call recording in windows. The filename was cut short by the null
byte inserted before the filename and extension.

Change-Id: I502d5f4c0360b19ea58ebb1fffbc61ec41567dfa
parent 880c285a
Branches
Tags
No related merge requests found
......@@ -39,7 +39,7 @@ namespace jami {
std::wstring
to_wstring(const std::string& s)
{
int slength = (int)s.length() + 1;
int slength = (int)s.length();
int len = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), slength, nullptr, 0);
if (not len)
throw std::runtime_error("Can't convert string to wchar");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment