[Scummvm-git-logs] scummvm master -> 8db3779f7d5beb491b6be019b6dde6ae5e2a3a54
sluicebox
noreply at scummvm.org
Sat Apr 15 22:43:46 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:
8db3779f7d AUDIO: Fix crash when OPL driver isn't loaded
Commit: 8db3779f7d5beb491b6be019b6dde6ae5e2a3a54
https://github.com/scummvm/scummvm/commit/8db3779f7d5beb491b6be019b6dde6ae5e2a3a54
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-04-15T15:42:57-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