Commit 8b4bc768 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

use delete[], add assert

parent 8b4cad8a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
    }
}