Skip to content
Permalink
Browse files

[delimitedtext] Don't use an out of range index while reading string …

…buffer (fixes a Qt warning)
  • Loading branch information
nirvn committed Jul 28, 2020
1 parent a896ac9 commit ff38315edfcb894830cf5c9877b610344a0843d9
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/providers/delimitedtext/qgsdelimitedtextfile.cpp
@@ -764,11 +764,8 @@ QgsDelimitedTextFile::Status QgsDelimitedTextFile::parseQuoted( QString &buffer,

while ( true )
{
QChar c = buffer[cp];
cp++;

// If end of line then if escaped or buffered then try to get more...
if ( cp > cpmax )
if ( cp >= cpmax )
{
if ( quoted || escaped )
{
@@ -787,6 +784,9 @@ QgsDelimitedTextFile::Status QgsDelimitedTextFile::parseQuoted( QString &buffer,
break;
}

QChar c = buffer[cp];
cp++;

// If escaped, then just append the character
if ( escaped )
{

0 comments on commit ff38315

Please sign in to comment.
You can’t perform that action at this time.