File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33edbee.lib:
44
5+ - fix #140 , Fix Array index out of bounds assertion loading with TextDocumentSerializer
56- fix #136 , BREAKING CHANGE: return type TextEditorController::executeCommand changed to void.
67 - changed TextEditorController slot arguments to fully-qualified types.
78- ref #136 , remove TextDocumentController readonly methods from slots
Original file line number Diff line number Diff line change @@ -42,14 +42,14 @@ bool TextDocumentSerializer::loadWithoutOpening( QIODevice* ioDevice )
4242 QTextDecoder* textDecoder=0 ;
4343
4444 // read the buffer
45- QByteArray bytes (blockSize_ + 1 ,0 );
45+ QByteArray bytes (blockSize_ + 1 , 0 );
4646 QString remainingBuffer;
4747
4848 // / TODO: atEnd doesn't seem to work !?!
4949// / TODO: implement isStopRequested to stop loading if required
5050 while ( /* ioDeviceRef_->atEnd() &&*/ true /* !isStopRequested()*/ ) {
5151
52- int bytesRead = ioDevice->read ( bytes.data (), blockSize_ );
52+ int bytesRead = ioDevice->read ( bytes.data (), blockSize_ - 1 );
5353 if ( bytesRead > 0 ) {
5454 bytes[bytesRead + 1 ] = 0 ; // 0 terminate the read bytes
5555
You can’t perform that action at this time.
0 commit comments