diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index b9cc1c8b9b..165c2b2f52 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -33,9 +33,7 @@ void DropDownListItem::Draw(const Rect &r, bool sel, Colours bg_colour) const uint DropDownListStringItem::Width() const { - char buffer[512]; - GetString(buffer, this->String(), lastof(buffer)); - return GetStringBoundingBox(buffer).width + WidgetDimensions::scaled.dropdowntext.Horizontal(); + return GetStringBoundingBox(this->String()).width + WidgetDimensions::scaled.dropdowntext.Horizontal(); } void DropDownListStringItem::Draw(const Rect &r, bool sel, Colours bg_colour) const