summaryrefslogtreecommitdiff
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dropdown.cpp2
-rw-r--r--src/widgets/dropdown_type.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp
index 3412a98bd..c450dc7b8 100644
--- a/src/widgets/dropdown.cpp
+++ b/src/widgets/dropdown.cpp
@@ -65,7 +65,7 @@ StringID DropDownListParamStringItem::String() const
StringID DropDownListCharStringItem::String() const
{
- SetDParamStr(0, this->raw_string);
+ SetDParamStr(0, this->raw_string.c_str());
return this->string;
}
diff --git a/src/widgets/dropdown_type.h b/src/widgets/dropdown_type.h
index c7d3251d6..5617027e3 100644
--- a/src/widgets/dropdown_type.h
+++ b/src/widgets/dropdown_type.h
@@ -68,9 +68,9 @@ public:
*/
class DropDownListCharStringItem : public DropDownListStringItem {
public:
- const char *raw_string;
+ std::string raw_string;
- DropDownListCharStringItem(const char *raw_string, int result, bool masked) : DropDownListStringItem(STR_JUST_RAW_STRING, result, masked), raw_string(raw_string) {}
+ DropDownListCharStringItem(const std::string &raw_string, int result, bool masked) : DropDownListStringItem(STR_JUST_RAW_STRING, result, masked), raw_string(raw_string) {}
StringID String() const override;
};