diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index 7568849ad..0dec3db10 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -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;