structure array deserialization fixed

This commit is contained in:
Matej Sekoranja
2012-08-20 09:03:45 +02:00
parent 0e48497cd4
commit 156a05079e

View File

@@ -192,6 +192,7 @@ void PVStructureArray::deserialize(ByteBuffer *pbuffer,
if(size>=0) {
// prepare array, if necessary
if(size>getCapacity()) setCapacity(size);
setLength(size);
PVStructurePtrArray *pvArray = value.get();
for(size_t i = 0; i<size; i++) {
pcontrol->ensureData(1);
@@ -207,7 +208,6 @@ void PVStructureArray::deserialize(ByteBuffer *pbuffer,
(*pvArray)[i]->deserialize(pbuffer, pcontrol);
}
}
setLength(size);
postPut();
}
}