fix assert on converting internal name from ANSI to wchar

This commit is contained in:
zilmar 2015-02-27 10:09:30 +11:00
parent 0a2895f7d8
commit 8e912cb229
1 changed files with 7 additions and 0 deletions

View File

@ -1732,7 +1732,14 @@ void CALL RomOpen (void)
// get the name of the ROM
for (int i=0; i<20; i++)
{
name[i] = gfx.HEADER[(32+i)^3];
if (name[i] >= 0x80)
{
name[i] = 0;
break;
}
}
name[20] = 0;
// remove all trailing spaces