diff options
Diffstat (limited to 'keyboards/rocketboard_16/keymaps/default')
-rw-r--r-- | keyboards/rocketboard_16/keymaps/default/keymap.c | 4 |
1 files changed, 2 insertions, 2 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); } |