summaryrefslogtreecommitdiff
path: root/thirdparty/basis_universal/encoder/basisu_enc.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/basis_universal/encoder/basisu_enc.h')
-rw-r--r--thirdparty/basis_universal/encoder/basisu_enc.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/thirdparty/basis_universal/encoder/basisu_enc.h b/thirdparty/basis_universal/encoder/basisu_enc.h
index 05c95cbc3b..0ce011452d 100644
--- a/thirdparty/basis_universal/encoder/basisu_enc.h
+++ b/thirdparty/basis_universal/encoder/basisu_enc.h
@@ -1634,6 +1634,14 @@ namespace basisu
if ((!l_weight) || (!r_weight))
{
+ l_children.resize(0);
+ new_l_child.set(0.0f);
+ l_ttsum = 0.0f;
+ l_weight = 0;
+ r_children.resize(0);
+ new_r_child.set(0.0f);
+ r_ttsum = 0.0f;
+ r_weight = 0;
TrainingVectorType firstVec;
for (uint32_t i = 0; i < node.m_training_vecs.size(); i++)
{
@@ -1660,7 +1668,7 @@ namespace basisu
}
}
- if (!l_weight)
+ if ((!l_weight) || (!r_weight))
return false;
}