46 va_list va_ptr; |
46 va_list va_ptr; |
47 lcd_rows *tmp, *newrow; |
47 lcd_rows *tmp, *newrow; |
48 int i = 0; |
48 int i = 0; |
49 |
49 |
50 va_start(va_ptr, format); |
50 va_start(va_ptr, format); |
51 vsnprintf(buf, Config.lcd_cols * sizeof(char), format, va_ptr); |
51 vsnprintf(buf, (Config.lcd_cols + 1) * sizeof(char), format, va_ptr); |
52 va_end(va_ptr); |
52 va_end(va_ptr); |
53 |
53 |
54 /* |
54 /* |
55 * Check if the line in row is allocated. If not, do it |
55 * Check if the line in row is allocated. If not, do it |
56 * and make sure the chain is valid. |
56 * and make sure the chain is valid. |