summaryrefslogtreecommitdiff
path: root/wsutil
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-06-16 11:40:22 -0700
committerGuy Harris <guy@alum.mit.edu>2017-06-16 18:41:00 +0000
commit435c68cd2b856a6be7d015e8703c6c83d9b8eb89 (patch)
treeed43830c1c74dbc6aeca9f6bfd357dffaee7c2f9 /wsutil
parenta0dfbccdfca79da5ed9bc250d18bceedd3598276 (diff)
downloadwireshark-435c68cd2b856a6be7d015e8703c6c83d9b8eb89.tar.gz
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 <guy@alum.mit.edu>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/unicode-utils.h2
1 files changed, 1 insertions, 1 deletions
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
}