diff options
author | hjk <[email protected]> | 2013-02-11 17:58:52 +0100 |
---|---|---|
committer | hjk <[email protected]> | 2013-02-11 18:00:19 +0100 |
commit | 5d1747c9d24f3252df9feb928c1fef0d82ba2c88 (patch) | |
tree | 983c53feea9a88564710e3ce094b2d9a1aa2d358 /src/plugins/debugger/debuggerprotocol.cpp | |
parent | e75bc748b4a477ae61139698fa67a78b146b64c0 (diff) |
Debugger: Fix auto test and dumper for unusual strings
This handles embedded NUL and other unprintable contents.
Change-Id: Iabd59935eca83bc14b000ebb1e8901983530a3d6
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerprotocol.cpp')
-rw-r--r-- | src/plugins/debugger/debuggerprotocol.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp index 4c677cc4981..ed2f9a547fe 100644 --- a/src/plugins/debugger/debuggerprotocol.cpp +++ b/src/plugins/debugger/debuggerprotocol.cpp @@ -501,7 +501,7 @@ QString decodeData(const QByteArray &ba, int encoding) case Hex2EncodedLatin1WithQuotes: { // 6, %02x encoded 8 bit Latin1 data const QChar doubleQuote(QLatin1Char('"')); const QByteArray decodedBa = QByteArray::fromHex(ba); - return doubleQuote + QString::fromLatin1(decodedBa) + doubleQuote; + return doubleQuote + QString::fromLatin1(decodedBa, decodedBa.size()) + doubleQuote; } case Hex4EncodedLittleEndianWithQuotes: { // 7, %04x encoded 16 bit data const QChar doubleQuote(QLatin1Char('"')); |