Skip to content

Commit

Permalink
Fix string to char comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 1, 2021
1 parent 6eed7a4 commit 184e635
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresconn.cpp
Expand Up @@ -1244,11 +1244,11 @@ QString QgsPostgresConn::quotedJsonValue( const QVariant &value )
{
if ( value.isNull() || !value.isValid() )
return QStringLiteral( "null" );
// where json is a string literal just construct it from that rather than dump
// where json is a string literal just construct it from that rather than dump
if ( value.type() == QVariant::String )
{
QString valueStr = value.toString();
if ( valueStr.at( 0 ) == "\"" && valueStr.at( valueStr.size() - 1 ) == "\"" )
if ( valueStr.at( 0 ) == '\"' && valueStr.at( valueStr.size() - 1 ) == '\"' )
{
return quotedString( value.toString() );
}
Expand Down

0 comments on commit 184e635

Please sign in to comment.