debugger: fix recently introduced regression with compiled dumpers.

'+' instead of '+='. Duh.
This commit is contained in:
hjk
2010-09-08 10:21:30 +02:00
parent 7544e75360
commit ad95e3372d
2 changed files with 7 additions and 9 deletions

View File

@@ -1156,10 +1156,8 @@ static inline bool isInteger(const QString &n)
}
void QtDumperHelper::evaluationParameters(const WatchData &data,
const TypeData &td,
Debugger debugger,
QByteArray *inBuffer,
QByteArrayList *extraArgsIn) const
const TypeData &td, Debugger debugger,
QByteArray *inBuffer, QByteArrayList *extraArgsIn) const
{
enum { maxExtraArgCount = 4 };
@@ -1189,10 +1187,9 @@ void QtDumperHelper::evaluationParameters(const WatchData &data,
for (int i = 0; i < count; i++)
extraArgs.push_back(evaluationSizeofTypeExpression(inners.at(i), debugger));
}
int extraArgCount = extraArgs.size();
// Pad with zeros
const int extraPad = maxExtraArgCount - extraArgCount;
for (int i = 0; i < extraPad; i++)
while (extraArgs.size() < maxExtraArgCount)
extraArgs.push_back("0");
// in rare cases we need more or less: