File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -601,6 +601,7 @@ manapi::status manapi::slice_base::rshift_add_(std::size_t s) MANAPIHTTP_NOEXCEP
601601
602602 if (this ->count ) {
603603 this ->last = parts[this ->count - 1 ];
604+ this ->last ->next = nullptr ;
604605 }
605606 else {
606607 assert (this ->shift_ == 0 );
@@ -800,7 +801,8 @@ manapi::status manapi::slice::resize(std::size_t size) MANAPIHTTP_NOEXCEPT {
800801 return status_ok ();
801802
802803 if (size < cur) {
803- assert (this ->rshift_add_ (cur - size).ok ());
804+ auto res = this ->rshift_add_ (cur - size).ok ();
805+ assert (res);
804806 }
805807 else {
806808 size -= cur;
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ UTEST(slice, slice_pop) {
4848 if (i != c.size () - 1 )
4949 s.append (c[i]);
5050 }
51- b.resize (b.size () - c[2 ].size ());
51+ b.resize (b.size () - c[2 ].size ()). unwrap () ;
5252 ASSERT_TRUE (!b.cmp (s.data (), s.size ()));
5353 }
5454 manapi::async::run (ctx->stop ());
You can’t perform that action at this time.
0 commit comments