From f077004523355be4be3e3beee57305e1f6b67229 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 1 Feb 2020 22:10:32 -0800 Subject: [PATCH] UI: Fix incorrect parameter This param is the buffer size, including null terminator --- UI/obs-app.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index 0dec3db10..e25cb1569 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -2027,7 +2027,7 @@ bool GetFileSafeName(const char *name, std::string &file) return false; file.resize(len); - os_wcs_to_utf8(wfile.c_str(), wfile.size(), &file[0], len); + os_wcs_to_utf8(wfile.c_str(), wfile.size(), &file[0], len + 1); return true; }