diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-05-28 19:40:48 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-05-28 19:40:48 +0000 |
commit | 64a8034226e6529a7ba65c005c846a70e17a1664 (patch) | |
tree | 27d057130f77a685861704ef31e919eeee319f43 /lib/Lex/LiteralSupport.cpp | |
parent | c7e04dad588a30c94648b9bd70cdbe25688d7629 (diff) |
Fix a miscompile of wchar pascal strings.
(radar 8020384)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/LiteralSupport.cpp')
-rw-r--r-- | lib/Lex/LiteralSupport.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Lex/LiteralSupport.cpp b/lib/Lex/LiteralSupport.cpp index b73f236641..ff4d28f128 100644 --- a/lib/Lex/LiteralSupport.cpp +++ b/lib/Lex/LiteralSupport.cpp @@ -905,6 +905,8 @@ StringLiteralParser(const Token *StringToks, unsigned NumStringToks, if (Pascal) { ResultBuf[0] = ResultPtr-&ResultBuf[0]-1; + if (AnyWide) + ResultBuf[0] /= wchar_tByteWidth; // Verify that pascal strings aren't too large. if (GetStringLength() > 256 && Complain) { |