diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-02-05 22:23:13 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-02-05 22:23:13 +0000 |
commit | 3f49137f9027f0c2cf8b0318548a69505c4708ab (patch) | |
tree | 24562077c0946600cee6550d2cbdd82bc220523b /layout-custom.c | |
parent | fe7cf0ba90dc99f03ecc778fc8941c3626085910 (diff) | |
download | rtmux-3f49137f9027f0c2cf8b0318548a69505c4708ab.tar.gz rtmux-3f49137f9027f0c2cf8b0318548a69505c4708ab.tar.bz2 rtmux-3f49137f9027f0c2cf8b0318548a69505c4708ab.zip |
Check for the right return value from sscanf.
Diffstat (limited to 'layout-custom.c')
-rw-r--r-- | layout-custom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layout-custom.c b/layout-custom.c index 88fcde1f..8a4f08dc 100644 --- a/layout-custom.c +++ b/layout-custom.c @@ -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); |