aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/jsruntime/qv4object.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 0208c85c69..3b2fb091dd 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -454,9 +454,9 @@ PropertyAttributes Object::queryIndexed(const Managed *m, uint index)
return o->arrayData->attributes(index);
if (o->isStringObject()) {
- Property *p = static_cast<const StringObject *>(o)->getIndex(index);
- if (p)
- return Attr_Data;
+ String *s = static_cast<const StringObject *>(o)->value.asString();
+ if (index < (uint)s->length())
+ return (Attr_NotWritable|Attr_NotConfigurable);
}
return Attr_Invalid;
}