Commit eaec3372 authored by hjk's avatar hjk

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: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent 427c32cc
......@@ -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])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment