Avoid another segfault when debugging.

This commit is contained in:
Bill Currie 2011-02-09 10:13:08 +09:00
parent 68cdc904f5
commit 55b7f6eee4

View file

@ -447,7 +447,7 @@ PR_Get_Source_Line (progs_t *pr, pr_uint_t addr)
file = PR_Load_Source_File (pr, fname);
if (!file || line > file->num_lines)
if (!file || !file->lines || line > file->num_lines)
return va ("%s:%u", fname, line);
return va ("%s:%u:%.*s", fname, line, (int)file->lines[line - 1].len,