Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/Common/UTFConvert.cpp')
-rwxr-xr-xCPP/Common/UTFConvert.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/CPP/Common/UTFConvert.cpp b/CPP/Common/UTFConvert.cpp
index 9d1fd005..95362430 100755
--- a/CPP/Common/UTFConvert.cpp
+++ b/CPP/Common/UTFConvert.cpp
@@ -99,7 +99,7 @@ static Bool Utf16_To_Utf8(char *dest, size_t *destLen, const wchar_t *src, size_
c2 = src[srcPos++];
if (c2 < 0xDC00 || c2 >= 0xE000)
break;
- value = ((value - 0xD800) << 10) | (c2 - 0xDC00);
+ value = (((value - 0xD800) << 10) | (c2 - 0xDC00)) + 0x10000;
}
for (numAdds = 1; numAdds < 5; numAdds++)
if (value < (((UInt32)1) << (numAdds * 5 + 6)))