Skip to content

Commit d646a4e

Browse files
committed
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. fixes #8619
1 parent a25645a commit d646a4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: sway/commands/resize.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ static struct cmd_results *cmd_resize_set(int argc, char **argv) {
457457
if (argc > num_consumed_args) {
458458
return cmd_results_new(CMD_INVALID, "%s", usage);
459459
}
460-
if (width.unit == MOVEMENT_UNIT_INVALID) {
460+
if (height.unit == MOVEMENT_UNIT_INVALID) {
461461
return cmd_results_new(CMD_INVALID, "%s", usage);
462462
}
463463
}

0 commit comments

Comments
 (0)