mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-08 01:36:54 +08:00
Fix stack_vector.pop_back() pre-decrementing
Fixes #547, found by @balint-luko.
This commit is contained in:
parent
d7832661e7
commit
c7fcc9f7d9
@ -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