[Scummvm-cvs-logs] scummvm master -> 40e9374679a48e7d5d1d71078826e578f61d7ad1

lordhoto lordhoto at gmail.com
Thu Mar 10 02:57:30 CET 2011


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:
40e9374679 ALSA: Strip trailing spaces in device name.


Commit: 40e9374679a48e7d5d1d71078826e578f61d7ad1
    https://github.com/scummvm/scummvm/commit/40e9374679a48e7d5d1d71078826e578f61d7ad1
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2011-03-09T17:54:32-08:00

Commit Message:
ALSA: Strip trailing spaces in device name.

This might fix odd problems when storing the device name in the config file,
when the name ends with a space by chance.

Changed paths:
    backends/midi/alsa.cpp



diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp
index 953b088..1e8064e 100644
--- a/backends/midi/alsa.cpp
+++ b/backends/midi/alsa.cpp
@@ -280,6 +280,9 @@ typedef Common::List<AlsaDevice> AlsaDevices;
 
 AlsaDevice::AlsaDevice(Common::String name, MusicType mt, int client)
 	: _name(name), _type(mt), _client(client) {
+	// Make sure we do not get any trailing spaces to avoid problems when
+	// storing the name in the configuration file.
+	_name.trim();
 }
 
 Common::String AlsaDevice::getName() {






More information about the Scummvm-git-logs mailing list