diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/c-exp.y | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 201a8c5..e22ba0c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-09-04 Pedro Alves <palves@redhat.com> + + * c-exp.y (parse_number): Skip handling base-switching prefixes if + the input is only one character long. + 2014-09-04 Sergio Durigan Junior <sergiodj@redhat.com> PR fortran/17237 diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 56400ce..7339ee8 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -1824,7 +1824,7 @@ parse_number (struct parser_state *par_state, } /* Handle base-switching prefixes 0x, 0t, 0d, 0 */ - if (p[0] == '0') + if (p[0] == '0' && len > 1) switch (p[1]) { case 'x': |