UI: Fix incorrect parameter

This param is the buffer size, including null terminator
This commit is contained in:
jp9000 2020-02-01 22:10:32 -08:00
parent 3f9ca9644a
commit f077004523

View file

@ -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;
}