aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlirbuilder.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-28 16:53:37 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-29 17:40:03 +0000
commita6fb18f1865aff8b96dfba1e341019371b5fa9f2 (patch)
tree330940164adcbb048a715415f5c462b7abbffccd /src/qml/compiler/qqmlirbuilder.cpp
parente38f5e9cb1430c2bd1095f566ed752d36eed0029 (diff)
Fix uninitialized variables/data
* Initialize the indexOfRootObject member * When creating the QV4::CompiledData::String objects, don't include the one ushort _beyond_ the QString, which is random data. Change-Id: I8fe8a465e2713a385504f217b367a62b70ee5fdf Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qqmlirbuilder.cpp')
-rw-r--r--src/qml/compiler/qqmlirbuilder.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp
index e5d97341b9..c645a29b15 100644
--- a/src/qml/compiler/qqmlirbuilder.cpp
+++ b/src/qml/compiler/qqmlirbuilder.cpp
@@ -290,6 +290,7 @@ void Document::removeScriptPragmas(QString &script)
Document::Document(bool debugMode)
: jsModule(debugMode)
, program(0)
+ , indexOfRootObject(0)
, jsGenerator(&jsModule)
, unitFlags(0)
{