diff options
author | waylonis <waylonis@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-12-20 17:22:41 +0000 |
---|---|---|
committer | waylonis <waylonis@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-12-20 17:22:41 +0000 |
commit | c4d599912cb4189bf20b07c541130201035736a1 (patch) | |
tree | 38acef6620fe6028c78f4f88b6c747b18bfff465 /src/common | |
parent | Add Mac string utilities. Reviewed by mmentovai. Fixes issue #98. (diff) | |
download | breakpad-c4d599912cb4189bf20b07c541130201035736a1.tar.xz |
Fix UTF32ToUTF16Char() conversion. Fixes issue #99. Reviewed by bryner.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@97 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/string_conversion.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/string_conversion.cc b/src/common/string_conversion.cc index e2345783..20682045 100644 --- a/src/common/string_conversion.cc +++ b/src/common/string_conversion.cc @@ -98,8 +98,8 @@ void UTF32ToUTF16(const wchar_t *in, vector<u_int16_t> *out) { } void UTF32ToUTF16Char(wchar_t in, u_int16_t out[2]) { - const UTF32 *source_ptr = reinterpret_cast<const UTF32 *>(in); - const UTF32 *source_end_ptr = source_ptr + sizeof(wchar_t); + const UTF32 *source_ptr = reinterpret_cast<const UTF32 *>(&in); + const UTF32 *source_end_ptr = source_ptr + 1; u_int16_t *target_ptr = out; u_int16_t *target_end_ptr = target_ptr + 2 * sizeof(u_int16_t); out[0] = out[1] = 0; |