1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

terminal.c: put source commit id in 'line==NULL' dialog.

People sometimes send in cut-and-pastes of that dialog box from very
old versions of PuTTY. This can usually be detected because the
'lineno' field in the error message refers to a line number in
terminal.c which doesn't have a call to lineptr() or scrlineptr() on
it _now_ but used to a long time ago). But that's a pretty roundabout
way to detect anything, so let's put some more reliable version
information in the error message.

(This might also provide a way to test the hypothesis that whatever
bug used to cause this dialog box to appear is now fixed, and that
_all_ remaining reports of this error message are from outdated
builds.)
This commit is contained in:
Simon Tatham 2018-03-11 13:35:53 +00:00
parent 97a248b463
commit 28520e41ac

View File

@ -1085,19 +1085,21 @@ static termline *lineptr(Terminal *term, int y, int lineno, int screen)
/* We assume that we don't screw up and retrieve something out of range. */
if (line == NULL) {
extern const char commitid[]; /* in version.c */
modalfatalbox("line==NULL in terminal.c\n"
"lineno=%d y=%d w=%d h=%d\n"
"count(scrollback=%p)=%d\n"
"count(screen=%p)=%d\n"
"count(alt=%p)=%d alt_sblines=%d\n"
"whichtree=%p treeindex=%d\n\n"
"whichtree=%p treeindex=%d\n"
"commitid=%s\n\n"
"Please contact <putty@projects.tartarus.org> "
"and pass on the above information.",
lineno, y, term->cols, term->rows,
term->scrollback, count234(term->scrollback),
term->screen, count234(term->screen),
term->alt_screen, count234(term->alt_screen),
term->alt_sblines, whichtree, treeindex);
term->alt_sblines, whichtree, treeindex, commitid);
}
assert(line != NULL);