ds: array: fix iterable_begin not setting iterator status
This commit is contained in:
@@ -371,6 +371,7 @@ static b_iterator *iterable_begin(b_object *obj)
|
||||
if (it->_a_p->ar_len > 0) {
|
||||
it->value = it->_a_p->ar_data[0];
|
||||
} else {
|
||||
b_iterator_set_status(it_obj, B_ERR_NO_DATA);
|
||||
it->value = NULL;
|
||||
}
|
||||
|
||||
@@ -389,6 +390,7 @@ static const b_iterator *iterable_cbegin(const b_object *obj)
|
||||
if (it->_a_p->ar_len > 0) {
|
||||
it->value = it->_a_p->ar_data[0];
|
||||
} else {
|
||||
b_iterator_set_status(it_obj, B_ERR_NO_DATA);
|
||||
it->value = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user