Commit 13a9fcba authored by Philippe Gorley's avatar Philippe Gorley Committed by Adrien Béraud

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
......@@ -39,7 +39,7 @@ namespace jami {
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");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment