Browse Source

use delete[], add assert

pull/1/head
Dick Hollenbeck 15 years ago
parent
commit
8b4bc768a9
  1. 4
      common/richio.cpp

4
common/richio.cpp

@ -71,9 +71,11 @@ void LINE_READER::expandCapacity( unsigned newsize )
// resize the buffer, and copy the original data
char* bigger = new char[capacity];
wxASSERT( capacity >= length );
memcpy( bigger, line, length );
delete line;
delete[] line;
line = bigger;
}
}

Loading…
Cancel
Save