mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
Merge pull request #548 from ChaiScript/stack-vector-pop-back
Fix stack_vector.pop_back() pre-decrementing
This commit is contained in:
commit
cb55083603
@ -43,7 +43,7 @@ struct Stack_Vector
|
||||
};
|
||||
|
||||
void pop_back() noexcept(std::is_nothrow_destructible_v<T>) {
|
||||
(*this)[m_size--].~T();
|
||||
(*this)[--m_size].~T();
|
||||
}
|
||||
|
||||
~Stack_Vector() noexcept(std::is_nothrow_destructible_v<T>)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user