Debugger: Fix memory editing.

Typing characters > 127 caused signedness problems
(causing large uints to be passed to the debuggers).

Reviewed-by: hjk
This commit is contained in:
Friedemann Kleint
2011-04-19 12:56:23 +02:00
committed by con
parent 3fcc88fc84
commit 7ee4034ddc
2 changed files with 6 additions and 3 deletions

View File

@@ -333,8 +333,10 @@ QByteArray cdbWriteMemoryCommand(quint64 addr, const QByteArray &data)
str.setIntegerBase(16);
str << "f " << addr << " L" << data.size();
const int count = data.size();
for (int i = 0 ; i < count ; i++ )
str << ' ' << int(data.at(i));
for (int i = 0 ; i < count ; i++ ) {
const unsigned char uc = (unsigned char)data.at(i);
str << ' ' << unsigned(uc);
}
return cmd;
}