diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2008-09-02 05:29:22 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2008-09-02 05:29:22 +0000 |
commit | 6f7adbdcd07a6c13cb81bf3048d1e52f149a9377 (patch) | |
tree | 63322696cea58934f535fb3d080df068a9187d51 /lib/Lex/LiteralSupport.cpp | |
parent | bc88745b43f440341e60ed93b0d27bac7c418029 (diff) |
Fix for PR2750; don't check for an 'e' in the trash after the token.
Note that this isn't really a complete fix; I think there are other
potential overrun situations. I don't really know what the best
systematic fix is, though.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/LiteralSupport.cpp')
-rw-r--r-- | lib/Lex/LiteralSupport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/LiteralSupport.cpp b/lib/Lex/LiteralSupport.cpp index f9fd1aac79..8c2f2aff47 100644 --- a/lib/Lex/LiteralSupport.cpp +++ b/lib/Lex/LiteralSupport.cpp @@ -224,7 +224,7 @@ NumericLiteralParser(const char *begin, const char *end, saw_period = true; s = SkipDigits(s); } - if (*s == 'e' || *s == 'E') { // exponent + if (s != ThisTokEnd && (*s == 'e' || *s == 'E')) { // exponent const char *Exponent = s; s++; saw_exponent = true; |