worked around a MESS related issue with software lists calling display_loading_rom_message with zero romstotalsize. additional investigation is in progress to understand if the code is faulty on the MESS side or not...

no whatsnew needed.
This commit is contained in:
Fabio Priuli 2010-04-28 07:28:56 +00:00
parent 26e06630b5
commit 0a3adb23ca

View File

@ -558,7 +558,9 @@ static void display_loading_rom_message(rom_load_data *romdata, const char *name
{ {
char buffer[200]; char buffer[200];
if (name != NULL) // 2010-04, FP - FIXME: in MESS, load_software_part_region sometimes calls this with romstotalsize = 0!
// as a temp workaround, I added a check for romstotalsize !=0.
if (name != NULL && romdata->romstotalsize)
sprintf(buffer, "Loading (%d%%)", (UINT32)(100 * (UINT64)romdata->romsloadedsize / (UINT64)romdata->romstotalsize)); sprintf(buffer, "Loading (%d%%)", (UINT32)(100 * (UINT64)romdata->romsloadedsize / (UINT64)romdata->romstotalsize));
else else
sprintf(buffer, "Loading Complete"); sprintf(buffer, "Loading Complete");