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.
This commit is contained in:
Johannes Schickel 2011-03-10 02:53:33 +01:00
parent 60bad3754b
commit 40e9374679

View File

@ -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() {