mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-06-20 04:27:55 -04:00
[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
This commit is contained in:
parent
62b08aec25
commit
39f71ddef6
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue