don't crash when removing out of bounds
This commit is contained in:
parent
db42c21754
commit
16470f2592
2 changed files with 10 additions and 1 deletions
1
test.c
1
test.c
|
|
@ -17,6 +17,7 @@ main(int argc, char *argv[])
|
|||
ds_ll_foreach(ds_sll_t, ll) {
|
||||
puts(cur->data);
|
||||
}
|
||||
ds_sll_remove(&ll, 1234);
|
||||
char *pa = ds_sll_remove(&ll, 0); // [ "two" ]
|
||||
char *pb = ds_sll_remove(&ll, 0); // [ ]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue