From 40e9374679a48e7d5d1d71078826e578f61d7ad1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 10 Mar 2011 02:53:33 +0100 Subject: 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. --- backends/midi/alsa.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'backends') 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 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() { -- cgit v1.2.3