Fixed all instances of the usage of wcstombs to use a sizeof() of whatever the destination is instead of the source size.

This commit is contained in:
OBattler
2017-07-20 11:32:41 +02:00
parent b18f16c4bc
commit 3e195b74d0
5 changed files with 11 additions and 10 deletions

View File

@@ -985,7 +985,7 @@ int image_open(uint8_t id, wchar_t *fn)
}
cdimg[id] = new CDROM_Interface_Image();
wcstombs(afn, fn, (wcslen(fn) << 1) + 2);
wcstombs(afn, fn, sizeof(afn));
if (!cdimg[id]->SetDevice(afn, false))
{
image_close(id);