aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/log.c4
-rw-r--r--sway/commands.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/common/log.c b/common/log.c
index 6d958db2..c68f0516 100644
--- a/common/log.c
+++ b/common/log.c
@@ -68,7 +68,7 @@ void _sway_log(log_importance_t verbosity, const char* format, ...) {
#endif
if (verbosity <= v) {
unsigned int c = verbosity;
- if (c > sizeof(verbosity_colors) / sizeof(char *)) {
+ if (c > sizeof(verbosity_colors) / sizeof(char *) - 1) {
c = sizeof(verbosity_colors) / sizeof(char *) - 1;
}
@@ -96,7 +96,7 @@ void _sway_log(log_importance_t verbosity, const char* format, ...) {
void sway_log_errno(log_importance_t verbosity, char* format, ...) {
if (verbosity <= v) {
unsigned int c = verbosity;
- if (c > sizeof(verbosity_colors) / sizeof(char *)) {
+ if (c > sizeof(verbosity_colors) / sizeof(char *) - 1) {
c = sizeof(verbosity_colors) / sizeof(char *) - 1;
}
diff --git a/sway/commands.c b/sway/commands.c
index 73e9ffaf..9b0356c4 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -2113,7 +2113,7 @@ static struct cmd_results *cmd_split(int argc, char **argv) {
}
} else {
error = cmd_results_new(CMD_FAILURE, "split",
- "Invalid split command (expected either horiziontal or vertical).");
+ "Invalid split command (expected either horizontal or vertical).");
return error;
}
return cmd_results_new(CMD_SUCCESS, NULL, NULL);