From 435c68cd2b856a6be7d015e8703c6c83d9b8eb89 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 16 Jun 2017 11:40:22 -0700 Subject: Fix SURROGATE_VALUE() to match what RFC 2781 says. While we're at it, note in the comment for get_utf_16_string() the "decoding UTF-16" algorithm in RFC 2781. Change-Id: I5d7dc5c09af0474c055796e49e0c7b94fa87d2ad Reviewed-on: https://code.wireshark.org/review/22171 Reviewed-by: Guy Harris --- wsutil/unicode-utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wsutil') diff --git a/wsutil/unicode-utils.h b/wsutil/unicode-utils.h index 902a4fb4b5..30ec43a919 100644 --- a/wsutil/unicode-utils.h +++ b/wsutil/unicode-utils.h @@ -101,7 +101,7 @@ void arg_list_utf_16to8(int argc, char *argv[]); #define IS_TRAIL_SURROGATE(uchar2) \ ((uchar2) >= 0xdc00 && (uchar2) < 0xe000) #define SURROGATE_VALUE(lead, trail) \ - (((((lead) - 0xd800) << 10) | ((trail) - 0xdc00)) + 0x100000) + (((((lead) - 0xd800) << 10) | ((trail) - 0xdc00)) + 0x10000) #ifdef __cplusplus } -- cgit v1.2.1