Avoid an unlikely buffer overflow.

This commit is contained in:
Unknown W. Brackets 2013-10-05 10:17:46 -07:00
parent 1b1a8cef02
commit 093255a895

View File

@ -346,7 +346,7 @@ void GetSysDirectories(std::string &memstickpath, std::string &flash0path) {
char memstickpath_buf[_MAX_PATH];
char flash0path_buf[_MAX_PATH];
GetModuleFileName(NULL, path_buffer, sizeof(path_buffer));
GetModuleFileName(NULL, path_buffer, ARRAY_SIZE(path_buffer));
std::string path = ConvertWStringToUTF8(path_buffer);