The previous malloc fix was too large.
This commit is contained in:
parent
0742eb4ecb
commit
82e62778bc
@ -751,11 +751,11 @@ void update_read_polyline_order(STREAM* s, ORDER_INFO* orderInfo, POLYLINE_ORDER
|
||||
if (orderInfo->fieldFlags & ORDER_FIELD_07)
|
||||
{
|
||||
stream_read_uint8(s, polyline->cbData);
|
||||
|
||||
fprintf(stderr, "TONG %d %d %d\n", sizeof(DELTA_POINT*), polyline->cbData, polyline->numPoints);
|
||||
if (polyline->points == NULL)
|
||||
polyline->points = (DELTA_POINT*) xmalloc(sizeof(DELTA_POINT) * polyline->cbData);
|
||||
polyline->points = (DELTA_POINT*) xmalloc(sizeof(DELTA_POINT) * polyline->numPoints);
|
||||
else
|
||||
polyline->points = (DELTA_POINT*) xrealloc(polyline->points, sizeof(DELTA_POINT) * polyline->cbData);
|
||||
polyline->points = (DELTA_POINT*) xrealloc(polyline->points, sizeof(DELTA_POINT) * polyline->numPoints);
|
||||
|
||||
update_read_delta_points(s, polyline->points, polyline->numPoints, polyline->xStart, polyline->yStart);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user