[Scummvm-git-logs] scummvm branch-2-7 -> 7bfd1efc7099fe44e3269a6fd0e287e4154aba9c
sluicebox
noreply at scummvm.org
Sun Apr 16 00:16:09 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7bfd1efc70 AUDIO: Fix crash when OPL driver isn't loaded
Commit: 7bfd1efc7099fe44e3269a6fd0e287e4154aba9c
https://github.com/scummvm/scummvm/commit/7bfd1efc7099fe44e3269a6fd0e287e4154aba9c
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-04-15T17:15:36-07:00
Commit Message:
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
Changed paths:
audio/fmopl.cpp
diff --git a/audio/fmopl.cpp b/audio/fmopl.cpp
index c1a0a75f091..b881d7941d7 100644
--- a/audio/fmopl.cpp
+++ b/audio/fmopl.cpp
@@ -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;
}
}
More information about the Scummvm-git-logs
mailing list