tweaks: condense a fragment of code by making use of a helper function
(It copies a byte too many, which then gets overwritten in the next statement, but this is not speed-critical code.)master
parent
054559dc93
commit
1a8646393a
|
@ -150,8 +150,7 @@ void do_help(void)
|
|||
|
||||
/* Extract the title from the head of the help text. */
|
||||
length = break_line(help_text, MAX_BUF_SIZE, TRUE);
|
||||
title = charalloc(length * sizeof(char) + 1);
|
||||
strncpy(title, help_text, length);
|
||||
title = measured_copy(help_text, length + 1);
|
||||
title[length] = '\0';
|
||||
|
||||
titlebar(title);
|
||||
|
|
Loading…
Reference in New Issue