update: Updated stuff so the scanner works great now

This commit is contained in:
Maieul BOYER 2024-09-06 16:46:01 +02:00
parent 88c34b3904
commit 475038e2b7
No known key found for this signature in database
21 changed files with 787 additions and 340 deletions

View file

@ -17,9 +17,11 @@
t_subtree *vec_subtree_get(t_vec_subtree *vec, t_usize i)
{
if (vec == NULL || vec->len >= i)
if (vec == NULL || vec->buffer == NULL)
return (NULL);
return (&vec->buffer[i]);
if (i < vec->len)
return (&vec->buffer[i]);
return (NULL);
}
t_subtree *vec_subtree_last(t_vec_subtree *vec)