degesch: fix mIRC color parsing
This commit is contained in:
		
							parent
							
								
									2d040cae73
								
							
						
					
					
						commit
						24159e0214
					
				| @ -1987,10 +1987,11 @@ formatter_parse_mirc_color (struct formatter *self, const char *s) | |||||||
| 
 | 
 | ||||||
| 	if (*s != ',' || !isdigit_ascii (s[1])) | 	if (*s != ',' || !isdigit_ascii (s[1])) | ||||||
| 		return s; | 		return s; | ||||||
|  | 	s++; | ||||||
| 
 | 
 | ||||||
| 	int bg = *++s - '0'; | 	int bg = *s++ - '0'; | ||||||
| 	if (isdigit_ascii (s[1])) | 	if (isdigit_ascii (*s)) | ||||||
| 		bg = bg * 10 + (*++s - '0'); | 		bg = bg * 10 + (*s++ - '0'); | ||||||
| 	if (bg >= 0 && bg < 16) | 	if (bg >= 0 && bg < 16) | ||||||
| 		FORMATTER_ADD_ITEM (self, BG_COLOR, .color = g_mirc_to_terminal[bg]); | 		FORMATTER_ADD_ITEM (self, BG_COLOR, .color = g_mirc_to_terminal[bg]); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user