Merge pull request #766 from cxd4/plz-dont-do-this
fixed impossible arithmetic condition
This commit is contained in:
commit
5008c7f024
|
@ -426,14 +426,13 @@ void CRomBrowser::FillRomExtensionInfo(ROM_INFO * pRomInfo)
|
|||
//Get the selected color
|
||||
sprintf(String, "%s.Sel", pRomInfo->Status);
|
||||
m_RomIniFile->GetString("Rom Status", String, "FFFFFFFF", String, 9);
|
||||
int selcol = std::strtoul(String, 0, 16);
|
||||
if (selcol < 0)
|
||||
uint32_t selcol = std::strtoul(String, NULL, 16);
|
||||
if (selcol & 0x80000000)
|
||||
{
|
||||
pRomInfo->SelColor = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
selcol = (std::strtoul(String, 0, 16) & 0xFFFFFF);
|
||||
selcol = (selcol & 0x00FF00) | ((selcol >> 0x10) & 0xFF) | ((selcol & 0xFF) << 0x10);
|
||||
pRomInfo->SelColor = selcol;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue