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:
hjk
2015-08-10 11:50:18 +02:00
parent 427c32ccb0
commit eaec337265
+1 -1
View File
@@ -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])