Skip to content

Commit

Permalink
Merge pull request #23 from Hoikas/fix_to_buffer
Browse files Browse the repository at this point in the history
Fix `ST::string::to_buffer` always giving latin_1.
  • Loading branch information
zrax authored Jun 7, 2022
2 parents dce5606 + eacce38 commit 8bcd9bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/st_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -1070,8 +1070,8 @@ namespace ST
{
if (utf8)
result = to_utf8();

result = to_latin_1(substitute_out_of_range);
else
result = to_latin_1(substitute_out_of_range);
}

ST_DEPRECATED_IN_3_0("use to_buffer(char_buffer &, bool, bool) instead")
Expand All @@ -1080,8 +1080,8 @@ namespace ST
{
if (utf8)
result = to_utf8();

result = to_latin_1(validation == substitute_invalid);
else
result = to_latin_1(validation == substitute_invalid);
}

void to_buffer(utf16_buffer &result) const
Expand Down

0 comments on commit 8bcd9bb

Please sign in to comment.