Skip to content

Commit 71a6ffa

Browse files
committed
Use wstring for vertlabels
1 parent 5d0f19f commit 71a6ffa

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/guiFormSpecMenu.cpp

+5-6
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ void GUIFormSpecMenu::parseVertLabel(parserData* data,std::string element) {
10691069

10701070
if (parts.size() == 2) {
10711071
std::vector<std::string> v_pos = split(parts[0],',');
1072-
std::string text = parts[1];
1072+
std::wstring text = narrow_to_wide(unescape_string(parts[1]));
10731073

10741074
MY_CHECKPOS("vertlabel",1);
10751075

@@ -1082,17 +1082,16 @@ void GUIFormSpecMenu::parseVertLabel(parserData* data,std::string element) {
10821082
if(data->bp_set != 2)
10831083
errorstream<<"WARNING: invalid use of label without a size[] element"<<std::endl;
10841084

1085-
text = unescape_string(text);
1086-
std::string label = "";
1085+
std::wstring label = L"";
10871086

10881087
for (unsigned int i=0; i < text.length(); i++) {
1089-
label += text.c_str()[i];
1090-
label += "\n";
1088+
label += text[i];
1089+
label += L"\n";
10911090
}
10921091

10931092
FieldSpec spec = FieldSpec(
10941093
L"",
1095-
narrow_to_wide(label.c_str()),
1094+
label,
10961095
L"",
10971096
258+m_fields.size()
10981097
);

0 commit comments

Comments
 (0)