summaryrefslogtreecommitdiff
path: root/share/qtcreator/gdbmacros/gdbmacros.cpp
diff options
context:
space:
mode:
authorcon <qtc-committer@nokia.com>2009-05-12 15:24:05 +0200
committercon <qtc-committer@nokia.com>2009-05-12 16:47:56 +0200
commit6264ba4f5946429ea1a0068607e3a870e915be6b (patch)
tree188c48b3b758497006d1a3bd1b74d3eb134fa54c /share/qtcreator/gdbmacros/gdbmacros.cpp
parenta8aa5c82197d0a28616d8cd5ce8a59dce797b65a (diff)
downloadqt-creator-6264ba4f5946429ea1a0068607e3a870e915be6b.tar.gz
Make QString dumper fail faster in case of uninitialized variables
Reviewed-by: hjk <qtc-committer@nokia.com>
Diffstat (limited to 'share/qtcreator/gdbmacros/gdbmacros.cpp')
-rw-r--r--share/qtcreator/gdbmacros/gdbmacros.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp
index b3f054ffbb..47b26368bf 100644
--- a/share/qtcreator/gdbmacros/gdbmacros.cpp
+++ b/share/qtcreator/gdbmacros/gdbmacros.cpp
@@ -2025,7 +2025,8 @@ static void qDumpQString(QDumper &d)
if (!str.isEmpty()) {
qCheckAccess(str.unicode());
- qCheckAccess(str.unicode() + str.size());
+ if (!str.unicode()[str.size()].isNull()) // must be '\0' terminated
+ qCheckAccess(0);
}
P(d, "value", str);