Skip to content
This repository
Browse code

[Fix/Gui] Change the string format operation for language - name.

This prevents a possible crash while formatting the lang-name string for presentation in the audio dialog.
  • Loading branch information...
commit 50978621fe7d283b187500239ced6eb0ae9f0f6d 1 parent a83ee99
Andreas Zelend authored May 26, 2013
4  xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
@@ -178,7 +178,7 @@ void CGUIDialogAudioSubtitleSettings::AddAudioStreams(unsigned int id)
178 178
     else
179 179
       strItem.Format("%s - %s", strLanguage.c_str(), info.name.c_str());
180 180
 
181  
-    strItem.Format("%s (%i/%i)", strItem.c_str(), i + 1, (int)setting.max + 1);
  181
+    strItem.AppendFormat(" (%i/%i)", i + 1, (int)setting.max + 1);
182 182
     setting.entry.push_back(make_pair(setting.entry.size(), strItem));
183 183
   }
184 184
 
@@ -224,7 +224,7 @@ void CGUIDialogAudioSubtitleSettings::AddSubtitleStreams(unsigned int id)
224 224
     else
225 225
       strItem.Format("%s - %s", strLanguage.c_str(), info.name.c_str());
226 226
 
227  
-    strItem.Format("%s (%i/%i)", strItem.c_str(), i + 1, (int)setting.max + 1);
  227
+    strItem.AppendFormat(" (%i/%i)", i + 1, (int)setting.max + 1);
228 228
 
229 229
     setting.entry.push_back(make_pair(setting.entry.size(), strItem));
230 230
   }

0 notes on commit 5097862

Please sign in to comment.
Something went wrong with that request. Please try again.