Skip to content

Commit

Permalink
[Fix/Gui] Change the string format operation for language - name.
Browse files Browse the repository at this point in the history
This prevents a possible crash while formatting the lang-name string for presentation in the audio dialog.
  • Loading branch information
ace20022 committed May 26, 2013
1 parent a83ee99 commit 5097862
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void CGUIDialogAudioSubtitleSettings::AddAudioStreams(unsigned int id)
else
strItem.Format("%s - %s", strLanguage.c_str(), info.name.c_str());

strItem.Format("%s (%i/%i)", strItem.c_str(), i + 1, (int)setting.max + 1);
strItem.AppendFormat(" (%i/%i)", i + 1, (int)setting.max + 1);
setting.entry.push_back(make_pair(setting.entry.size(), strItem));
}

Expand Down Expand Up @@ -224,7 +224,7 @@ void CGUIDialogAudioSubtitleSettings::AddSubtitleStreams(unsigned int id)
else
strItem.Format("%s - %s", strLanguage.c_str(), info.name.c_str());

strItem.Format("%s (%i/%i)", strItem.c_str(), i + 1, (int)setting.max + 1);
strItem.AppendFormat(" (%i/%i)", i + 1, (int)setting.max + 1);

setting.entry.push_back(make_pair(setting.entry.size(), strItem));
}
Expand Down

0 comments on commit 5097862

Please sign in to comment.