[Scummvm-cvs-logs] scummvm branch-1-8 -> 9c8b2938cb7801d90953c5ac64ec7482e4d59901
sev-
sev at scummvm.org
Fri Mar 4 17:07:02 CET 2016
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:
9c8b2938cb WIN32: Fix invalid array accesses when MIDI device listing fails.
Commit: 9c8b2938cb7801d90953c5ac64ec7482e4d59901
https://github.com/scummvm/scummvm/commit/9c8b2938cb7801d90953c5ac64ec7482e4d59901
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-03-04T17:06:49+01:00
Commit Message:
WIN32: Fix invalid array accesses when MIDI device listing fails.
Changed paths:
backends/midi/windows.cpp
diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp
index e2b327f..52a4620 100644
--- a/backends/midi/windows.cpp
+++ b/backends/midi/windows.cpp
@@ -185,6 +185,9 @@ MusicDevices WindowsMusicPlugin::getDevices() const {
deviceNames.push_back(tmp.szPname);
}
+ // Limit us to the number of actually retrieved devices.
+ numDevs = deviceNames.size();
+
// Check for non-unique device names. This may happen if someone has devices with identical
// names (e. g. more than one USB device of the exact same hardware type). It seems that this
// does happen in reality sometimes. We generate index numbers for these devices.
More information about the Scummvm-git-logs
mailing list