Skip to content

Commit 8bcd9bb

Browse files
authored
Merge pull request #23 from Hoikas/fix_to_buffer
Fix `ST::string::to_buffer` always giving latin_1.
2 parents dce5606 + eacce38 commit 8bcd9bb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/st_string.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,8 +1070,8 @@ namespace ST
10701070
{
10711071
if (utf8)
10721072
result = to_utf8();
1073-
1074-
result = to_latin_1(substitute_out_of_range);
1073+
else
1074+
result = to_latin_1(substitute_out_of_range);
10751075
}
10761076

10771077
ST_DEPRECATED_IN_3_0("use to_buffer(char_buffer &, bool, bool) instead")
@@ -1080,8 +1080,8 @@ namespace ST
10801080
{
10811081
if (utf8)
10821082
result = to_utf8();
1083-
1084-
result = to_latin_1(validation == substitute_invalid);
1083+
else
1084+
result = to_latin_1(validation == substitute_invalid);
10851085
}
10861086

10871087
void to_buffer(utf16_buffer &result) const

0 commit comments

Comments
 (0)