diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2025-04-24 15:41:20 -0400 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2025-04-24 15:41:20 -0400 |
| commit | e1192b9b00a70a9f1772579037d169a49a7caeed (patch) | |
| tree | e49165417455ecb625dd060aa17a2ca2610640ee | |
| parent | de78aafb6357c52056941f51bdc7b7e3cccae26c (diff) | |
sway/commands: Handle incorrect resize unit
problem: an invalid usage of the command resize set will cause sway to crash because it doesn't check for an invalid height.
solution: validate height along with width.
| -rw-r--r-- | sway/commands/resize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/resize.c b/sway/commands/resize.c index 32b746ea..49731a64 100644 --- a/sway/commands/resize.c +++ b/sway/commands/resize.c @@ -457,7 +457,7 @@ static struct cmd_results *cmd_resize_set(int argc, char **argv) { if (argc > num_consumed_args) { return cmd_results_new(CMD_INVALID, "%s", usage); } - if (width.unit == MOVEMENT_UNIT_INVALID) { + if (height.unit == MOVEMENT_UNIT_INVALID) { return cmd_results_new(CMD_INVALID, "%s", usage); } } |
