mirror of
https://github.com/tmux/tmux.git
synced 2024-12-25 02:48:47 +00:00
Add a missing error message which causes an invalid layout name to crash.
This commit is contained in:
parent
993e7a937f
commit
f10854cfc5
@ -162,8 +162,10 @@ layout_parse(struct window *w, const char *layout, char **cause)
|
|||||||
u_short csum;
|
u_short csum;
|
||||||
|
|
||||||
/* Check validity. */
|
/* Check validity. */
|
||||||
if (sscanf(layout, "%hx,", &csum) != 1)
|
if (sscanf(layout, "%hx,", &csum) != 1) {
|
||||||
|
*cause = xstrdup("invalid layout");
|
||||||
return (-1);
|
return (-1);
|
||||||
|
}
|
||||||
layout += 5;
|
layout += 5;
|
||||||
if (csum != layout_checksum(layout)) {
|
if (csum != layout_checksum(layout)) {
|
||||||
*cause = xstrdup("invalid layout");
|
*cause = xstrdup("invalid layout");
|
||||||
|
Loading…
Reference in New Issue
Block a user