Fix ecma_builtin_global_object_decode_uri_helper.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
@@ -223,26 +223,26 @@ lit_is_cesu8_string_valid (const lit_utf8_byte_t *utf8_buf_p, /**< utf-8 string
|
||||
} /* lit_is_cesu8_string_valid */
|
||||
|
||||
/**
|
||||
* Check if the code unit type is low surrogate
|
||||
* Check if the code point is UTF-16 low surrogate
|
||||
*
|
||||
* @return true / false
|
||||
*/
|
||||
bool
|
||||
lit_is_code_unit_low_surrogate (ecma_char_t code_unit) /**< code unit */
|
||||
lit_is_code_point_utf16_low_surrogate (lit_code_point_t code_point) /**< code point */
|
||||
{
|
||||
return LIT_UTF16_LOW_SURROGATE_MIN <= code_unit && code_unit <= LIT_UTF16_LOW_SURROGATE_MAX;
|
||||
} /* lit_is_code_unit_low_surrogate */
|
||||
return LIT_UTF16_LOW_SURROGATE_MIN <= code_point && code_point <= LIT_UTF16_LOW_SURROGATE_MAX;
|
||||
} /* lit_is_code_point_utf16_low_surrogate */
|
||||
|
||||
/**
|
||||
* Check if the code unit type is high surrogate
|
||||
* Check if the code point is UTF-16 high surrogate
|
||||
*
|
||||
* @return true / false
|
||||
*/
|
||||
bool
|
||||
lit_is_code_unit_high_surrogate (ecma_char_t code_unit) /**< code unit */
|
||||
lit_is_code_point_utf16_high_surrogate (lit_code_point_t code_point) /**< code point */
|
||||
{
|
||||
return LIT_UTF16_HIGH_SURROGATE_MIN <= code_unit && code_unit <= LIT_UTF16_HIGH_SURROGATE_MAX;
|
||||
} /* lit_is_code_unit_high_surrogate */
|
||||
return LIT_UTF16_HIGH_SURROGATE_MIN <= code_point && code_point <= LIT_UTF16_HIGH_SURROGATE_MAX;
|
||||
} /* lit_is_code_point_utf16_high_surrogate */
|
||||
|
||||
/**
|
||||
* Initialize iterator for traversing utf-8 string as a string of code units
|
||||
@@ -925,8 +925,8 @@ lit_code_point_t
|
||||
lit_convert_surrogate_pair_to_code_point (ecma_char_t high_surrogate, /**< high surrogate code point */
|
||||
ecma_char_t low_surrogate) /**< low surrogate code point */
|
||||
{
|
||||
JERRY_ASSERT (lit_is_code_unit_high_surrogate (high_surrogate));
|
||||
JERRY_ASSERT (lit_is_code_unit_low_surrogate (low_surrogate));
|
||||
JERRY_ASSERT (lit_is_code_point_utf16_high_surrogate (high_surrogate));
|
||||
JERRY_ASSERT (lit_is_code_point_utf16_low_surrogate (low_surrogate));
|
||||
|
||||
lit_code_point_t code_point;
|
||||
code_point = (uint16_t) (high_surrogate - LIT_UTF16_HIGH_SURROGATE_MIN);
|
||||
|
||||
Reference in New Issue
Block a user