summaryrefslogtreecommitdiff
path: root/keyboards/rocketboard_16
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/rocketboard_16')
-rw-r--r--keyboards/rocketboard_16/keymaps/default/keymap.c4
-rw-r--r--keyboards/rocketboard_16/keymaps/via/keymap.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/keyboards/rocketboard_16/keymaps/default/keymap.c b/keyboards/rocketboard_16/keymaps/default/keymap.c
index ce26a834d0..dc83cbd62b 100644
--- a/keyboards/rocketboard_16/keymaps/default/keymap.c
+++ b/keyboards/rocketboard_16/keymaps/default/keymap.c
@@ -107,10 +107,10 @@ static void oled_write_ln_centered(const char * data, bool inverted)
char line_buf[21];
// Amount to offset string from left side
- uint8_t offset = (21 - strlen(data))/2;
+ uint8_t offset = (22 - strlen(data)) / 2;
// Formatted string centering... look, it works, don't ask how...
- snprintf(line_buf, 21, "%*s%s%*s\0", offset, "", data, offset, ""); // Centers data within 21 character buffer with null termination
+ snprintf(line_buf, 21, "%*s%s%*s", offset, "", data, offset, ""); // Centers data within 21 character buffer
oled_write_ln(line_buf, inverted);
}
diff --git a/keyboards/rocketboard_16/keymaps/via/keymap.c b/keyboards/rocketboard_16/keymaps/via/keymap.c
index ce26a834d0..08b8e65b4f 100644
--- a/keyboards/rocketboard_16/keymaps/via/keymap.c
+++ b/keyboards/rocketboard_16/keymaps/via/keymap.c
@@ -107,10 +107,10 @@ static void oled_write_ln_centered(const char * data, bool inverted)
char line_buf[21];
// Amount to offset string from left side
- uint8_t offset = (21 - strlen(data))/2;
+ uint8_t offset = (22 - strlen(data))/2;
// Formatted string centering... look, it works, don't ask how...
- snprintf(line_buf, 21, "%*s%s%*s\0", offset, "", data, offset, ""); // Centers data within 21 character buffer with null termination
+ snprintf(line_buf, 21, "%*s%s%*s", offset, "", data, offset, ""); // Centers data within 21 character buffer
oled_write_ln(line_buf, inverted);
}