Merge pull request #858 from agriffis/fix-gcc-11

Fix build with GCC 11
This commit is contained in:
Max Brunsfeld 2020-12-22 20:38:52 -08:00 committed by GitHub
commit 115bf3fd44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -448,6 +448,7 @@ TSTreeCursor ts_tree_cursor_copy(const TSTreeCursor *_cursor) {
TSTreeCursor res = {NULL, NULL, {0, 0}};
TreeCursor *copy = (TreeCursor *)&res;
copy->tree = cursor->tree;
array_init(&copy->stack);
array_push_all(&copy->stack, &cursor->stack);
return res;
}