aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-06-17 09:18:19 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-06-17 11:43:48 +0200
commit21705ae91e727812ebaef80583136c29505e977d (patch)
tree03958ced68bae6d5e1b0ccf9a85cd9b4bd35f609 /src
parent59fd742adce2e988264deda6f8378e66ed6da686 (diff)
Fix most qjsonbinding auto tests
Change-Id: I67476bc7e931e2f4790e859d4a3c00c050752271 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/v4/qv4jsonobject.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/qml/v4/qv4jsonobject.cpp b/src/qml/qml/v4/qv4jsonobject.cpp
index 45fe90dba2..1d83a0d2e5 100644
--- a/src/qml/qml/v4/qv4jsonobject.cpp
+++ b/src/qml/qml/v4/qv4jsonobject.cpp
@@ -345,7 +345,7 @@ bool JsonParser::parseValue(Value *val)
switch ((json++)->unicode()) {
case 'n':
- if (end - json < 4) {
+ if (end - json < 3) {
lastError = QJsonParseError::IllegalValue;
return false;
}
@@ -360,7 +360,7 @@ bool JsonParser::parseValue(Value *val)
lastError = QJsonParseError::IllegalValue;
return false;
case 't':
- if (end - json < 4) {
+ if (end - json < 3) {
lastError = QJsonParseError::IllegalValue;
return false;
}
@@ -375,7 +375,7 @@ bool JsonParser::parseValue(Value *val)
lastError = QJsonParseError::IllegalValue;
return false;
case 'f':
- if (end - json < 5) {
+ if (end - json < 4) {
lastError = QJsonParseError::IllegalValue;
return false;
}
@@ -1007,6 +1007,7 @@ QV4::Value JsonObject::fromJsonArray(ExecutionEngine *engine, const QJsonArray &
a->arrayReserve(size);
for (int i = 0; i < size; i++)
a->arrayData[i].value = fromJsonValue(engine, array.at(i));
+ a->arrayDataLen = size;
a->setArrayLengthUnchecked(size);
return Value::fromObject(a);
}