From 62183e15d8e62101e398b969ddc76c3ccedee53e Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 11 Aug 2010 15:41:37 +0000 Subject: 2010-08-11 Brad Roberts * d-lang.c (extract_identifiers): Handle multiple digits. --- gdb/d-lang.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gdb/d-lang.c') 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; -- cgit v1.1