Use the right value as id for the BTranslatorRoster call.

The loop counter was used as the id directly instead of using it as the
index into the translator_id array.
This commit is contained in:
Michael Lotz
2011-12-07 00:21:21 +01:00
parent e6f323bb57
commit f28e19f5be
+2 -1
View File
@@ -222,7 +222,8 @@ Utility::_GetMimeString(uint32 imageType) const
const translation_format* formats = NULL;
int32 numFormats;
if (roster->GetOutputFormats(x, &formats, &numFormats) == B_OK) {
if (roster->GetOutputFormats(translators[x], &formats, &numFormats)
== B_OK) {
for (int32 i = 0; i < numFormats; ++i) {
if (formats[i].type == imageType) {
delete [] translators;