Commit dbd4fe12 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

STRING_LINE_READER::ReadLine() has been broken for a few weeks, since changing...

STRING_LINE_READER::ReadLine() has been broken for a few weeks, since changing the purpose of member 'source'
parent 27a02d32
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -131,13 +131,12 @@ unsigned STRING_LINE_READER::ReadLine() throw (IOError)
        if( length >= maxLineLength )
            throw IOError( _("Line length exceeded") );

        if( length+1 > capacity )
        if( length+1 > capacity )   // +1 for terminating nul
            expandCapacity( length+1 );

        wxASSERT( ndx + length <= lines.length() );

        memcpy( line, &source[ndx], length );
        line[length] = 0;
        memcpy( line, &lines[ndx], length );

        ++lineNum;
        ndx += length;