Add missing padding bytes check before storing tree inline

This commit is contained in:
Max Brunsfeld 2018-09-19 10:52:21 -07:00
parent 3672da6ac3
commit 3dab0066bc
7 changed files with 41 additions and 30 deletions

View file

@ -160,6 +160,7 @@ static void ts_subtree_pool_free(SubtreePool *self, SubtreeHeapData *tree) {
static inline bool ts_subtree_can_inline(Length padding, Length size) {
return
padding.bytes < TS_MAX_INLINE_TREE_LENGTH &&
padding.extent.row < 16 &&
padding.extent.column < TS_MAX_INLINE_TREE_LENGTH &&
size.extent.row == 0 &&