mirror of
https://github.com/tmux/tmux.git
synced 2024-12-24 18:38:48 +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;
|
||||
|
||||
/* Check validity. */
|
||||
if (sscanf(layout, "%hx,", &csum) != 1)
|
||||
if (sscanf(layout, "%hx,", &csum) != 1) {
|
||||
*cause = xstrdup("invalid layout");
|
||||
return (-1);
|
||||
}
|
||||
layout += 5;
|
||||
if (csum != layout_checksum(layout)) {
|
||||
*cause = xstrdup("invalid layout");
|
||||
|
Loading…
Reference in New Issue
Block a user