diff options
Diffstat (limited to 'gdb/cli/cli-utils.c')
-rw-r--r-- | gdb/cli/cli-utils.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/cli/cli-utils.c b/gdb/cli/cli-utils.c index f5d47ae..333a86a 100644 --- a/gdb/cli/cli-utils.c +++ b/gdb/cli/cli-utils.c @@ -60,13 +60,14 @@ get_ulongest (const char **pp, int trailer) } else { - retval = strtoulst (p, pp, 0); - if (p == *pp) + const char *end = p; + retval = strtoulst (p, &end, 0); + if (p == end) { /* There is no number here. (e.g. "cond a == b"). */ error (_("Expected integer at: %s"), p); } - p = *pp; + p = end; } if (!(isspace (*p) || *p == '\0' || *p == trailer)) |