summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/layout-custom.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-02-05 22:23:13 +0000
committernicm <nicm@openbsd.org>2012-02-05 22:23:13 +0000
commit952c1d50cd6066e20db9e30ccec14a3fb8c68673 (patch)
tree60490bee8dde7b1ffcb3bf581bc729ae919da3fc /usr.bin/tmux/layout-custom.c
parentDo not insert an empty ENTRY into the manpath list; (diff)
downloadwireguard-openbsd-952c1d50cd6066e20db9e30ccec14a3fb8c68673.tar.xz
wireguard-openbsd-952c1d50cd6066e20db9e30ccec14a3fb8c68673.zip
Check for the right return value from sscanf.
Diffstat (limited to 'usr.bin/tmux/layout-custom.c')
-rw-r--r--usr.bin/tmux/layout-custom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/layout-custom.c b/usr.bin/tmux/layout-custom.c
index d555a2d1cd3..4a241f3481a 100644
--- a/usr.bin/tmux/layout-custom.c
+++ b/usr.bin/tmux/layout-custom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: layout-custom.c,v 1.3 2012/01/30 20:57:02 nicm Exp $ */
+/* $OpenBSD: layout-custom.c,v 1.4 2012/02/05 22:23:13 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -207,7 +207,7 @@ layout_construct(struct layout_cell *lcparent, const char **layout)
if (!isdigit((u_char) **layout))
return (NULL);
- if (sscanf(*layout, "%ux%u,%u,%u,%*u", &sx, &sy, &xoff, &yoff) != 5 &&
+ if (sscanf(*layout, "%ux%u,%u,%u,%*u", &sx, &sy, &xoff, &yoff) != 4 &&
sscanf(*layout, "%ux%u,%u,%u", &sx, &sy, &xoff, &yoff) != 4)
return (NULL);