BAN: Use memmove instead of memcpy on overlapping data
I was accidentally using memcpy where memmove was needed
This commit is contained in:
parent
1c1a76d6d7
commit
0b05e9827b
|
@ -127,7 +127,7 @@ namespace BAN
|
||||||
void remove(size_type index)
|
void remove(size_type index)
|
||||||
{
|
{
|
||||||
ASSERT(index < m_size);
|
ASSERT(index < m_size);
|
||||||
memcpy(data() + index, data() + index + 1, m_size - index);
|
memmove(data() + index, data() + index + 1, m_size - index);
|
||||||
m_size--;
|
m_size--;
|
||||||
data()[m_size] = '\0';
|
data()[m_size] = '\0';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue