Revert "The previous malloc fix was too large."

This reverts commit 82e62778bc.
This commit is contained in:
Anthony Tong 2011-09-02 11:08:50 -04:00
parent 82e62778bc
commit fe207a5858

View File

@ -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->numPoints);
polyline->points = (DELTA_POINT*) xmalloc(sizeof(DELTA_POINT) * polyline->cbData);
else
polyline->points = (DELTA_POINT*) xrealloc(polyline->points, sizeof(DELTA_POINT) * polyline->numPoints);
polyline->points = (DELTA_POINT*) xrealloc(polyline->points, sizeof(DELTA_POINT) * polyline->cbData);
update_read_delta_points(s, polyline->points, polyline->numPoints, polyline->xStart, polyline->yStart);
}