Release 2.3.4

git-svn-id: http://svn.code.sf.net/p/utfcpp/code@138 a809a056-fc17-0410-9590-b4f493f8b08e
This commit is contained in:
ntrifunovic 2013-02-17 22:40:46 +00:00
parent 596feae4b9
commit 62b7d7ae0c
2 changed files with 5 additions and 3 deletions

View file

@ -1,8 +1,10 @@
utf8 cpp library
Release 2.3.3
Release 2.3.4
A minor bug fix release. Thanks to all who reported bugs.
Note: Version 2.3.3 contained a regression, and therefore was removed.
Changes from version 2.3.2
- Bug fix [39]: checked.h Line 273 and unchecked.h Line 182 have an extra ';'
- Bug fix [36]: replace_invalid() only works with back_inserter

View file

@ -233,7 +233,7 @@ namespace utf8
template <typename u16bit_iterator, typename octet_iterator>
u16bit_iterator utf8to16 (octet_iterator start, octet_iterator end, u16bit_iterator result)
{
while (start < end) {
while (start != end) {
uint32_t cp = utf8::next(start, end);
if (cp > 0xffff) { //make a surrogate pair
*result++ = static_cast<uint16_t>((cp >> 10) + internal::LEAD_OFFSET);
@ -257,7 +257,7 @@ namespace utf8
template <typename octet_iterator, typename u32bit_iterator>
u32bit_iterator utf8to32 (octet_iterator start, octet_iterator end, u32bit_iterator result)
{
while (start < end)
while (start != end)
(*result++) = utf8::next(start, end);
return result;