Fixed a bug where the last entry in a value table was not loaded.

This commit is contained in:
Collin Kidder
2015-08-27 21:48:33 -04:00
parent 80a8758e16
commit 7c6eb8f4f9
+3 -1
View File
@@ -225,7 +225,9 @@ void DBCHandler::loadDBCFile(QString filename)
val.descript = match.captured(2); val.descript = match.captured(2);
//qDebug() << "sig val " << val.value << " desc " <<val.descript; //qDebug() << "sig val " << val.value << " desc " <<val.descript;
sig->valList.append(val); sig->valList.append(val);
tokenString = tokenString.right(tokenString.length() - match.captured(1).length() - match.captured(2).length() - 4); int rightSize = tokenString.length() - match.captured(1).length() - match.captured(2).length() - 4;
if (rightSize > 0) tokenString = tokenString.right(rightSize);
else tokenString = "";
//qDebug() << "New token string: " << tokenString; //qDebug() << "New token string: " << tokenString;
} }
else tokenString = ""; else tokenString = "";