dont write out of bounds

text_rendering
Eggert Jung 10 months ago
parent 0e8b867323
commit 83fd0e8a8b

@ -77,7 +77,7 @@ static void json_parse_task(void *pvparameters){
uint8_t line = 0;
char *item = start;
char txt[5][50];
char txt[6][50];
while((item = strstr(item+1, "{ \"stopID\":")) != 0){
char symbol[10];
get_json_string(item, "symbol", symbol);
@ -106,7 +106,7 @@ static void json_parse_task(void *pvparameters){
}
sprintf(txt[line], "%.3s\t%.20s\t%.3s", symbol, direction, countdown);
//sprintf(txt[line], "%.3s\t%.20s\t%.4s", symbol, direction, countdown);
printf("line = %d: %s\n", line, txt[line]);
printf("\n");

Loading…
Cancel
Save