fixing various clang warnings

This commit is contained in:
Noel Berry
2021-03-20 22:17:40 -07:00
parent 3913cf7c02
commit 4351d77f73
7 changed files with 38 additions and 31 deletions

View File

@ -44,7 +44,7 @@ void Str::reserve(int size)
{
char* local = data();
m_buffer = new char[m_capacity];
strncpy(m_buffer, local, m_local_size);
memcpy(m_buffer, local, m_local_size);
m_buffer[m_local_size] = '\0';
}
// expand from empty buffer