forked from qt-creator/qt-creator
Debugger: Fix display of C-style wchar_t strings
The null delimiter was not reliably found due to iterating over the wrong positions in the string. Task-number: QTCREATORBUG-14826 Change-Id: I3a3f2fca84648b54b12fe5fae921ce6311d4f1b2 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
@@ -811,7 +811,7 @@ class DumperBase:
|
||||
code = (None, "b", "H", None, "I")[tsize]
|
||||
base = toInteger(p)
|
||||
blob = self.extractBlob(base, maximum).toBytes()
|
||||
for i in xrange(0, int(maximum / tsize)):
|
||||
for i in xrange(0, maximum, tsize):
|
||||
t = struct.unpack_from(code, blob, i)[0]
|
||||
if t == 0:
|
||||
return 0, i, self.hexencode(blob[:i])
|
||||
|
||||
Reference in New Issue
Block a user