diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp index 953b088958f..1e8064efbd8 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() {