#1666 Fix errors in CommandFile parsing for space between argname and "="

This commit is contained in:
Jacob Støren
2017-06-29 13:18:19 +02:00
parent ba84b9ec5a
commit 64bee4bb57
3 changed files with 52 additions and 14 deletions

View File

@@ -41,8 +41,6 @@ void RicfFieldReader<QString>::readFieldData(QString& fieldValue, QTextStream& i
if ( currentChar == QChar('"') ) // End Quote
{
// Reached end of string
// Read and eat , or ) ?
break;
}
else

View File

@@ -59,7 +59,21 @@ void RicfObjectCapability::readFields(QTextStream& inputStream, caf::PdmObjectFa
{
QChar currentChar;
inputStream >> currentChar;
if ( currentChar.isSpace() || currentChar == QChar('=') )
if ( currentChar.isSpace() )
{
// Must skip to, and read "="
inputStream.skipWhiteSpace();
inputStream >> currentChar;
if ( currentChar != QChar('=') )
{
// Error message: Missing "=" after argument name
}
break;
}
if ( currentChar == QChar('=') )
{
break;
}