Skip to content

Commit

Permalink
Fix encode() EILSEQ bug.
Browse files Browse the repository at this point in the history
	修改:     ChangeLog
	修改:     include/cppp/reiconv.hpp.in
  • Loading branch information
ChenPi11 committed Jul 19, 2023
1 parent 6619e41 commit 068a9df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2023-07-19 ChenPi11 <wushengwuxi-msctinoulk@outlook.com>

Fix encode()'s EILSEQ bug.

2023-07-17 ChenPi11 <wushengwuxi-msctinoulk@outlook.com>

Add social preview in README.md.
Expand Down
2 changes: 1 addition & 1 deletion include/cppp/reiconv.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ extern "C++"
size_t length = 0;
std::string ignstr = ignore?"//IGNORE":"";
if (iconv_string((to + ignstr).c_str(), from.c_str(),
data.data(), data.data() + data.size() + 1, &result, &length) < 0)
data.data(), data.data() + data.size(), &result, &length) < 0)
{
if(!ignore)
{
Expand Down

0 comments on commit 068a9df

Please sign in to comment.