Selaa lähdekoodia

UI: Fix incorrect parameter

This param is the buffer size, including null terminator
jp9000 5 vuotta sitten
vanhempi
sitoutus
f077004523
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      UI/obs-app.cpp

+ 1 - 1
UI/obs-app.cpp

@@ -2027,7 +2027,7 @@ bool GetFileSafeName(const char *name, std::string &file)
 		return false;
 		return false;
 
 
 	file.resize(len);
 	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;
 	return true;
 }
 }