diff options
author | Stefan Kerkmann <karlk90@pm.me> | 2022-07-07 14:14:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-07 14:14:09 +0200 |
commit | 643f6367a19649a0f5af6d43f2ed7f0e93b21f70 (patch) | |
tree | b51ba73169e3558dc724a25d995ecbd912c336bf /keyboards/rocketboard_16 | |
parent | 8224f62806b66f0825b68fd8c00436ee57a28e9a (diff) |
[Fix] Patches after printf library update (#17584)
* Add missing '(' to print_bin_reverse32 declaration
* Fix insufficient character buffers on satisfaction75
* Remove \0 character in format string and use corrected offset math
instead on rocketboard 16
* Replace snprintf_ with snprintf for djinn
* Explicitly ignore format checks for tracktyl manuform that uses %b
specifier
* Print properly escaped version string in command.c, as PRODUCT or
other defines can contain constructs like 'Vendor keyboard 66%' which
will be interpreted as a format specifier
Diffstat (limited to 'keyboards/rocketboard_16')
-rw-r--r-- | keyboards/rocketboard_16/keymaps/default/keymap.c | 4 | ||||
-rw-r--r-- | keyboards/rocketboard_16/keymaps/via/keymap.c | 4 |
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); } |