diff options
Diffstat (limited to 'ao-tools/lib')
-rw-r--r-- | ao-tools/lib/cc-logfile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ao-tools/lib/cc-logfile.c b/ao-tools/lib/cc-logfile.c index 2136eec4..3d346bcc 100644 --- a/ao-tools/lib/cc-logfile.c +++ b/ao-tools/lib/cc-logfile.c @@ -101,11 +101,12 @@ gpssat_add(struct cc_gpsdata *data, struct cc_gpssat *sat) if (data->sizesats == 0) newsats = malloc((newsizesats = 256) * sizeof (struct cc_gpssats)); else - newsats = realloc (data->data, (newsizesats = data->sizesats * 2) + newsats = realloc (data->sats, (newsizesats = data->sizesats * 2) * sizeof (struct cc_gpssats)); if (!newsats) return 0; data->sats = newsats; + data->sizesats = newsizesats; } i = data->numsats++; data->sats[i].nsat = 0; |