From cb757aff4fe8de0ac7ee9db43f203f10c38b91b9 Mon Sep 17 00:00:00 2001 From: ntrifunovic Date: Sun, 4 Oct 2009 18:17:22 +0000 Subject: [PATCH] Fix for bug #ID: 2857456[redundant checks in append in checked.h] git-svn-id: http://svn.code.sf.net/p/utfcpp/code@102 a809a056-fc17-0410-9590-b4f493f8b08e --- source/utf8/checked.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/utf8/checked.h b/source/utf8/checked.h index ecac556..ddf50b3 100644 --- a/source/utf8/checked.h +++ b/source/utf8/checked.h @@ -120,15 +120,12 @@ namespace utf8 *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); *(result++) = static_cast((cp & 0x3f) | 0x80); } - else if (cp <= internal::CODE_POINT_MAX) { // four octets + else { // four octets *(result++) = static_cast((cp >> 18) | 0xf0); *(result++) = static_cast(((cp >> 12) & 0x3f) | 0x80); *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); *(result++) = static_cast((cp & 0x3f) | 0x80); } - else - throw invalid_code_point(cp); - return result; }