Fix handling of failure to descend when getting changed ranges

This commit is contained in:
Max Brunsfeld 2016-11-05 21:26:01 -07:00
parent ff14cda959
commit 3f0e63058b

View file

@ -22,6 +22,7 @@ static void range_array_add(RangeArray *results, TSPoint start, TSPoint end) {
}
static bool tree_path_descend(TreePath *path, TSPoint position) {
size_t original_size = path->size;
bool did_descend;
do {
did_descend = false;
@ -45,6 +46,7 @@ static bool tree_path_descend(TreePath *path, TSPoint position) {
child_position = child_right_position;
}
} while (did_descend);
path->size = original_size;
return false;
}