mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
EFH: Fix 3 Coverity issues
This commit is contained in:
parent
0027ab8290
commit
f8883f9867
@ -750,8 +750,8 @@ void EfhEngine::getDeathTypeDescription(int16 victimId, int16 attackerId) {
|
||||
else
|
||||
deathType = _items[exclusiveItemId]._attackType + 1;
|
||||
}
|
||||
// The check "attackerId > 5" is a safeguard for a Coverity "OVERRUN" ticket, not present in the original
|
||||
} else if (attackerId > 5 || _teamMonster[attackerId]._id == -1) {
|
||||
// The check "attackerId >= 5" is a safeguard for a Coverity "OVERRUN" ticket, not present in the original
|
||||
} else if (attackerId >= 5 || _teamMonster[attackerId]._id == -1) {
|
||||
deathType = 0;
|
||||
} else {
|
||||
int16 itemId = _mapMonsters[_techId][_teamMonster[attackerId]._id]._weaponItemId;
|
||||
|
@ -35,9 +35,13 @@ void EfhEngine::songDelay(int delay) {
|
||||
|
||||
void EfhEngine::playNote(int frequencyIndex, int totalDelay) {
|
||||
debugC(3, kDebugEngine, "playNote %d %d", frequencyIndex, totalDelay);
|
||||
_speakerStream->play(Audio::PCSpeaker::kWaveFormSquare, 0x1234DD / kSoundFrequency[frequencyIndex], -1);
|
||||
songDelay(totalDelay);
|
||||
_speakerStream->stop();
|
||||
if (frequencyIndex > 0 && frequencyIndex < 72) {
|
||||
_speakerStream->play(Audio::PCSpeaker::kWaveFormSquare, 0x1234DD / kSoundFrequency[frequencyIndex], -1);
|
||||
songDelay(totalDelay);
|
||||
_speakerStream->stop();
|
||||
} else {
|
||||
warning("playNote - Skip note with frequency index %d", frequencyIndex);
|
||||
}
|
||||
}
|
||||
|
||||
Common::KeyCode EfhEngine::playSong(uint8 *buffer) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user