From f28e19f5be174afa6dd95af9ef35171bd48e3f1f Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 7 Dec 2011 00:21:21 +0100 Subject: [PATCH] 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. --- src/apps/screenshot/Utility.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/apps/screenshot/Utility.cpp b/src/apps/screenshot/Utility.cpp index 7d89b9a8cc..992535c0b7 100644 --- a/src/apps/screenshot/Utility.cpp +++ b/src/apps/screenshot/Utility.cpp @@ -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;