diff options
author | Tom Tromey <tromey@redhat.com> | 2010-08-11 15:41:37 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-08-11 15:41:37 +0000 |
commit | 62183e15d8e62101e398b969ddc76c3ccedee53e (patch) | |
tree | 5a80095783cdbdc2a8c269df3ae559e8679c6860 | |
parent | 39d7b0e29259dcf5cf966530ac416d1eb287ccbb (diff) | |
download | gdb-62183e15d8e62101e398b969ddc76c3ccedee53e.zip gdb-62183e15d8e62101e398b969ddc76c3ccedee53e.tar.gz gdb-62183e15d8e62101e398b969ddc76c3ccedee53e.tar.bz2 |
2010-08-11 Brad Roberts <braddr@puremagic.com>
* d-lang.c (extract_identifiers): Handle multiple digits.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/d-lang.c | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 72e614a..4d94b97 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-08-11 Brad Roberts <braddr@puremagic.com> + + * d-lang.c (extract_identifiers): Handle multiple digits. + 2010-08-11 Jan Kratochvil <jan.kratochvil@redhat.com> Code cleanup. diff --git a/gdb/d-lang.c b/gdb/d-lang.c index 6db521b..8ef47c7 100644 --- a/gdb/d-lang.c +++ b/gdb/d-lang.c @@ -37,9 +37,11 @@ extract_identifiers (const char *mangled_str, struct obstack *tempbuf) while (isdigit (*mangled_str)) { - i = strtol (mangled_str, NULL, 10); - mangled_str++; - if (i <= 0 && strlen (mangled_str) < i) + char *end_ptr; + + i = strtol (mangled_str, &end_ptr, 10); + mangled_str = end_ptr; + if (i <= 0 || strlen (mangled_str) < i) return 0; obstack_grow (tempbuf, mangled_str, i); mangled_str += i; |