[Scummvm-cvs-logs] scummvm master -> 1f217e3834a1ff2eceee2012dbfffbaa9b68ff7b

lordhoto lordhoto at gmail.com
Tue Mar 1 01:21:08 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:
1f217e3834 WIN32: Fix invalid array accesses when MIDI device listing fails.


Commit: 1f217e3834a1ff2eceee2012dbfffbaa9b68ff7b
    https://github.com/scummvm/scummvm/commit/1f217e3834a1ff2eceee2012dbfffbaa9b68ff7b
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-03-01T01:14:17+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