mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 01:49:42 -06:00
fix some UB
This commit is contained in:
@ -79,6 +79,7 @@ void DMA::Reset()
|
||||
Stall = false;
|
||||
|
||||
Running = false;
|
||||
Executing = false;
|
||||
InProgress = false;
|
||||
MRAMBurstCount = 0;
|
||||
}
|
||||
|
@ -144,10 +144,11 @@ struct NonStupidBitField
|
||||
{
|
||||
for (u32 i = 0; i < DataLength; i++)
|
||||
{
|
||||
u32 idx = __builtin_ctzll(Data[i]);
|
||||
if (Data[i] && idx + i * 64 < Size)
|
||||
if (Data[i])
|
||||
{
|
||||
return {*this, i, idx, Data[i] & ~(1ULL << idx)};
|
||||
u32 idx = __builtin_ctzll(Data[i]);
|
||||
if (idx + i * 64 < Size)
|
||||
return {*this, i, idx, Data[i] & ~(1ULL << idx)};
|
||||
}
|
||||
}
|
||||
return End();
|
||||
|
@ -301,7 +301,7 @@ ConfigEntry ConfigFile[] =
|
||||
{"AudioInterp", 0, &AudioInterp, 0, false},
|
||||
{"AudioBitDepth", 0, &AudioBitDepth, 0, false},
|
||||
{"AudioVolume", 0, &AudioVolume, 256, true},
|
||||
{"DSiVolumeSync", 0, &DSiVolumeSync, 0, true},
|
||||
{"DSiVolumeSync", 1, &DSiVolumeSync, false, true},
|
||||
{"MicInputType", 0, &MicInputType, 1, false},
|
||||
{"MicDevice", 2, &MicDevice, (std::string)"", false},
|
||||
{"MicWavPath", 2, &MicWavPath, (std::string)"", false},
|
||||
|
@ -451,6 +451,7 @@ void UnloadCheats()
|
||||
{
|
||||
delete CheatFile;
|
||||
CheatFile = nullptr;
|
||||
AREngine::SetCodeFile(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user