diff options
author | Quentin Glidic <sardemff7+git@sardemff7.net> | 2016-01-23 18:43:39 +0100 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2016-01-23 20:22:51 +0100 |
commit | 43483d8fee3b61a8dbd2734963597d7fc69c7934 (patch) | |
tree | a96acb3aebe07a4a1a555b1ff11822dfc3a228fe /sway | |
parent | 06f6552eeda696242201cc0997d1e36cb45a7103 (diff) |
commands: Fix usage of arrow in assign
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'sway')
-rw-r--r-- | sway/commands.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c index f6326038..fc3444ee 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -169,7 +169,10 @@ static struct cmd_results *cmd_assign(int argc, char **argv) { char *criteria = *argv++; - if (strncmp(*argv, "→", 1) == 0) { + if (strncmp(*argv, "→", strlen("→")) == 0) { + if (argc < 3) { + return cmd_results_new(CMD_INVALID, "assign", "Missing workspace"); + } argv++; } |