Skip to content

Commit

Permalink
fixed forgotten array
Browse files Browse the repository at this point in the history
  • Loading branch information
registry committed Aug 18, 2016
1 parent 1f685b4 commit f549b3b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ATTPortFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ ATTPortFactory::writeSecondaryPort( const wxString& path, const wxDateTime & da
file.Write( (char*)&timestamp, timeStampOffset );


char buffer[ port.getSize()];
char * buffer = new char[ port.getSize()];

port.toStream( buffer );

Expand All @@ -304,7 +304,8 @@ ATTPortFactory::writeSecondaryPort( const wxString& path, const wxDateTime & da
{
written += file.Write( buffer + written, port.getSize() - written );
}
file.Close();
file.Close();
delete[] buffer;
}


Expand Down

0 comments on commit f549b3b

Please sign in to comment.