diff options
Diffstat (limited to 'gdb/source.c')
-rw-r--r-- | gdb/source.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/source.c b/gdb/source.c index 5c300db..ad6c646 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1598,6 +1598,8 @@ search_command_helper (const char *regex, int from_tty, bool forward) else { line--; + if (line < 1) + break; if (fseek (stream.get (), current_source_symtab->line_charpos[line - 1], 0) < 0) { |