mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-07 19:36:21 +00:00
AUDIO: Fix crash when OPL driver isn't loaded
Fixes segfault when logging that an OPL driver doesn't support the emulation type requested by a game. The code used driver id as an array index, but this is incorrect because array indexes depends on which drivers are compiled in. This issue was identified and fixed in 2015, but this line was missed: 6f01600e12ba14acde8a6557716783861dc014d1 Fixes the crash in bug #14413
This commit is contained in:
parent
6ff2212f51
commit
8db3779f7d
@ -155,7 +155,7 @@ Config::DriverId Config::detect(OplType type) {
|
||||
} else {
|
||||
// Else we will output a warning and just
|
||||
// return that no valid driver is found.
|
||||
warning("Your selected OPL driver \"%s\" does not support type %d emulation, which is requested by your game", _drivers[drv].description, type);
|
||||
warning("Your selected OPL driver \"%s\" does not support type %d emulation, which is requested by your game", driverDesc->description, type);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user