diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2015-10-08 03:02:09 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2015-10-08 03:02:09 +0000 |
commit | 6c6d9cb283f42b60b31d2b48587cf4ecce8cb519 (patch) | |
tree | 51080c975a34d43f2a66ca183c69297944609c7f /src/cxa_demangle.cpp | |
parent | b4c998b0496177cc59cb6402d6eb5ab13b082d0e (diff) |
Fix incorrect parsing of arguments for nested functions. Reviewed as http://reviews.llvm.org/D13192. Thanks to Anseny Kapoulkine for the patch.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@249649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/cxa_demangle.cpp')
-rw-r--r-- | src/cxa_demangle.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cxa_demangle.cpp b/src/cxa_demangle.cpp index 2865bde..e6bf167 100644 --- a/src/cxa_demangle.cpp +++ b/src/cxa_demangle.cpp @@ -4054,7 +4054,7 @@ parse_nested_name(const char* first, const char* last, C& db, // <discriminator> := _ <non-negative number> # when number < 10 // := __ <non-negative number> _ # when number >= 10 -// extension := decimal-digit+ +// extension := decimal-digit+ # at the end of string const char* parse_discriminator(const char* first, const char* last) @@ -4083,7 +4083,8 @@ parse_discriminator(const char* first, const char* last) const char* t1 = first+1; for (; t1 != last && std::isdigit(*t1); ++t1) ; - first = t1; + if (t1 == last) + first = last; } } return first; |