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
github-actions authored and nyalldawson committed Jul 28, 2020
1 parent be4a844 commit af2e51d6a0fbe162f3c6135ecfc6b0edb9a7f0e6
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 af2e51d

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