[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
							
								
									8224f62806
								
							
						
					
					
						commit
						643f6367a1
					
				
					 7 changed files with 24 additions and 24 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);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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