- glcd: fix possible format-truncation error

output between 4 and 14 bytes into a destination of size 6
This commit is contained in:
max_10
2021-12-20 16:23:02 +01:00
committed by Thilo Graf
parent 111389fb2d
commit 8dfb6923da

View File

@@ -1086,7 +1086,7 @@ void cGLCD::Run(void)
if ((info_CurrentNext.current_zeit.dauer > 0) && (info_CurrentNext.current_zeit.dauer < 86400))
{
Scale = (ts.tv_sec - info_CurrentNext.current_zeit.startzeit) * 100 / info_CurrentNext.current_zeit.dauer;
char tmp_duration[6] = {0};
char tmp_duration[15] = {0};
int total = info_CurrentNext.current_zeit.dauer / 60;
int done = (abs(time(NULL) - info_CurrentNext.current_zeit.startzeit) + 30) / 60;
int todo = total - done;