• R/O
  • SSH
  • HTTPS

hamigaki: 提交


Commit MetaInfo

修訂1608 (tree)
時間2008-04-24 23:11:21
作者hamigaki

Log Message

fixed the bug about E2BIG

Change Summary

差異

--- hamigaki/trunk/hamigaki/charset/code_page.hpp (revision 1607)
+++ hamigaki/trunk/hamigaki/charset/code_page.hpp (revision 1608)
@@ -305,7 +305,10 @@
305305
306306 std::size_t res = cv.convert(src, src_size, dst, dst_size);
307307 if (res == detail::iconv_wrapper::error)
308- throw std::runtime_error("failed iconv()");
308+ {
309+ if (errno != E2BIG)
310+ throw std::runtime_error("failed iconv()");
311+ }
309312
310313 std::size_t len = dst-dst_buf;
311314 std::memcpy(tmp, dst_buf, len);
Show on old repository browser