diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 201a8c5728..e22ba0c82e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2014-09-04 Pedro Alves + + * c-exp.y (parse_number): Skip handling base-switching prefixes if + the input is only one character long. + 2014-09-04 Sergio Durigan Junior PR fortran/17237 diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 56400cee93..7339ee8cb7 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':