mirror of
https://github.com/pgpointcloud/pointcloud.git
synced 2025-12-08 20:36:04 +00:00
Fix pc_patch_uncompressed_from_lazperf
pc_patch_uncompressed_from_lazperf needs to set patch->datasize.
This commit is contained in:
parent
61e3604be2
commit
33445f7d87
@ -97,6 +97,7 @@ pc_patch_uncompressed_from_lazperf(const PCPATCH_LAZPERF *palaz)
|
||||
|
||||
if (size != -1)
|
||||
{
|
||||
size_t datasize;
|
||||
pcu = pcalloc(sizeof(PCPATCH_UNCOMPRESSED));
|
||||
pcu->type = PC_NONE;
|
||||
pcu->readonly = PC_FALSE;
|
||||
@ -107,10 +108,12 @@ pc_patch_uncompressed_from_lazperf(const PCPATCH_LAZPERF *palaz)
|
||||
|
||||
// not optimal but we have to pass by the context manager otherwise
|
||||
// a segfault happenned (sometimes) during a pcfree of lazperf field
|
||||
pcu->data = (uint8_t*) pcalloc(palaz->schema->size * palaz->npoints);
|
||||
memcpy(pcu->data, decompressed, palaz->schema->size * palaz->npoints);
|
||||
datasize = palaz->schema->size * palaz->npoints;
|
||||
pcu->data = (uint8_t*) pcalloc(datasize);
|
||||
memcpy(pcu->data, decompressed, datasize);
|
||||
free(decompressed);
|
||||
|
||||
pcu->datasize = datasize;
|
||||
pcu->maxpoints = palaz->npoints;
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user