mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 04:08:13 +02:00
check success in OctreePacketData::appendValue for qvectors of vec3s before proceeding with further data appends
This commit is contained in:
parent
8735fa1eac
commit
610bfc63e8
1 changed files with 5 additions and 3 deletions
|
@ -384,10 +384,12 @@ bool OctreePacketData::appendValue(const glm::vec3& value) {
|
||||||
bool OctreePacketData::appendValue(const QVector<glm::vec3>& value) {
|
bool OctreePacketData::appendValue(const QVector<glm::vec3>& value) {
|
||||||
uint16_t qVecSize = value.size();
|
uint16_t qVecSize = value.size();
|
||||||
bool success = appendValue(qVecSize);
|
bool success = appendValue(qVecSize);
|
||||||
success = append((const unsigned char*)value.constData(), qVecSize * sizeof(glm::vec3));
|
|
||||||
if (success) {
|
if (success) {
|
||||||
_bytesOfValues += qVecSize * sizeof(glm::vec3);
|
success = append((const unsigned char*)value.constData(), qVecSize * sizeof(glm::vec3));
|
||||||
_totalBytesOfValues += qVecSize * sizeof(glm::vec3);
|
if (success) {
|
||||||
|
_bytesOfValues += qVecSize * sizeof(glm::vec3);
|
||||||
|
_totalBytesOfValues += qVecSize * sizeof(glm::vec3);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue