mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
UI: Fix incorrect parameter value
The last parameter is the buffer size (which would include null terminator), not the desired string length.
This commit is contained in:
parent
65d38864b6
commit
3f9ca9644a
|
@ -2007,7 +2007,7 @@ bool GetFileSafeName(const char *name, std::string &file)
|
|||
return false;
|
||||
|
||||
wfile.resize(len);
|
||||
os_utf8_to_wcs(name, base_len, &wfile[0], len);
|
||||
os_utf8_to_wcs(name, base_len, &wfile[0], len + 1);
|
||||
|
||||
for (size_t i = wfile.size(); i > 0; i--) {
|
||||
size_t im1 = i - 1;
|
||||
|
|
Loading…
Reference in a new issue