test: peek tests done
This commit is contained in:
@@ -528,7 +528,7 @@ ArrayListErr arrayslice_peek(const ArraySlice *slice, void *out) {
|
||||
return ARRLIST_NULL_ARG;
|
||||
}
|
||||
|
||||
if (slice->current == slice->end) {
|
||||
if (slice->current >= slice->end) {
|
||||
return ARRLIST_INVALID_SLICE;
|
||||
}
|
||||
|
||||
@@ -569,7 +569,7 @@ ArrayListErr arrayslice_advance(ArraySlice *slice, size_t n) {
|
||||
return ARRLIST_NULL_ARG;
|
||||
}
|
||||
|
||||
if (n > SIZE_MAX - slice->current || slice->current + n >= slice->end) {
|
||||
if (n > SIZE_MAX - slice->current || slice->current + n > slice->end) {
|
||||
return ARRLIST_OUT_OF_BOUNDS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user