dont write out of bounds
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user