diff options
-rw-r--r-- | src/actions.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/actions.c b/src/actions.c index 57b3f58..4bc1b7d 100644 --- a/src/actions.c +++ b/src/actions.c @@ -3758,6 +3758,10 @@ set_historysize (struct cmdarg **args) if (args[0] == NULL) return cmdret_new (RET_SUCCESS, "%d", defaults.history_size); + if (ARG(0, number) < 0) + return cmdret_new (RET_FAILURE, "set historysize: %s", + invalid_negative_arg); + defaults.history_size = ARG(0, number); return cmdret_new (RET_SUCCESS, NULL); } @@ -3851,6 +3855,9 @@ set_padding (struct cmdarg **args) r = ARG(2,number); b = ARG(3,number); + if (l < 0 || t < 0 || r < 0 || b < 0) + return cmdret_new (RET_FAILURE, "set padding: %s", invalid_negative_arg); + /* Resize the frames to make sure they are not too big and not too small. */ list_for_each_entry (frame,&(current_screen()->frames),node) |