aboutsummaryrefslogtreecommitdiff
path: root/backends/midi
diff options
context:
space:
mode:
authorJohannes Schickel2011-03-10 02:53:33 +0100
committerJohannes Schickel2011-03-10 02:54:32 +0100
commit40e9374679a48e7d5d1d71078826e578f61d7ad1 (patch)
tree1edc68fb20abb39d769b4d5f5b7d5424e73407e1 /backends/midi
parent60bad3754b54e7cf178b54a9db6c487403289d71 (diff)
downloadscummvm-rg350-40e9374679a48e7d5d1d71078826e578f61d7ad1.tar.gz
scummvm-rg350-40e9374679a48e7d5d1d71078826e578f61d7ad1.tar.bz2
scummvm-rg350-40e9374679a48e7d5d1d71078826e578f61d7ad1.zip
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.
Diffstat (limited to 'backends/midi')
-rw-r--r--backends/midi/alsa.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp
index 953b088958..1e8064efbd 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() {