mirror of
https://github.com/holub/mame
synced 2025-07-17 07:19:48 +03:00
Fix a bug in pstring.cpp causing crash if moved object is reused. (nw)
This commit is contained in:
parent
ee8fed61c2
commit
f61e1f2123
@ -415,6 +415,8 @@ static inline std::size_t countleadbits(std::size_t x)
|
||||
template<typename F>
|
||||
void pstring_t<F>::sfree(pstr_t *s)
|
||||
{
|
||||
if (s != nullptr)
|
||||
{
|
||||
bool b = s->dec_and_check();
|
||||
if ( b && s != &m_zero)
|
||||
{
|
||||
@ -426,6 +428,7 @@ void pstring_t<F>::sfree(pstr_t *s)
|
||||
else
|
||||
plib::pfree_array(reinterpret_cast<char *>(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<typename F>
|
||||
|
Loading…
Reference in New Issue
Block a user