Fix mismatched new[] vs free() in Altium parser
This commit is contained in:
parent
4bc69183ab
commit
4ffbef5e42
|
@ -147,9 +147,10 @@ public:
|
|||
wxScopedCharBuffer ReadCharBuffer()
|
||||
{
|
||||
uint8_t len = Read<uint8_t>();
|
||||
|
||||
if( GetRemainingBytes() >= len )
|
||||
{
|
||||
char* buf = new char[len];
|
||||
char* buf = static_cast<char*>( malloc( len ) );
|
||||
memcpy( buf, m_pos, len );
|
||||
m_pos += len;
|
||||
|
||||
|
|
Loading…
Reference in New Issue