Skip to content

Commit

Permalink
LIBKML: workaround weird issue with OSGeo4W and newline characters in…
Browse files Browse the repository at this point in the history
… <coordinate> element (fixes https://issues.qgis.org/issues/19215)
  • Loading branch information
rouault committed Oct 6, 2018
1 parent 0fb323f commit 2957de2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gdal/ogr/ogrsf_frmts/libkml/ogrlibkmldatasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,10 @@ static void OGRLIBKMLPreProcessInput( std::string& oKml )
bool bDigitFound = false;
for( ; nPos < nPosEnd; nPos++ )
{
if( oKml[nPos] >= '0' && oKml[nPos] <= '9' )
char ch = oKml[nPos];
if( ch >= '0' && ch <= '9' )
bDigitFound = true;
else if( oKml[nPos] == '\t' )
else if( ch == '\t' || ch == '\n' )
oKml[nPos] = ' ';
}
if( !bDigitFound )
Expand Down

0 comments on commit 2957de2

Please sign in to comment.