diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-04-14 22:52:00 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-04-15 10:48:32 +0200 |
commit | 800e0a3d01a763b0cc6d4aa9590ff157f054de05 (patch) | |
tree | 57da5c7c3f43a04ae5a0fb285d6b0509bf756646 /src | |
parent | 774dc54c81daae607567489f98d97f316c712cdb (diff) |
Small fix for qmljs_delete_subscript
Change-Id: I19f5ae0bb0a138756bb3396ebda6300eb8958b16
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/v4/qv4runtime.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/v4/qv4runtime.cpp b/src/v4/qv4runtime.cpp index 955236f8b5..8787fcba66 100644 --- a/src/v4/qv4runtime.cpp +++ b/src/v4/qv4runtime.cpp @@ -182,11 +182,7 @@ Function *__qmljs_register_function(ExecutionContext *ctx, String *name, void __qmljs_delete_subscript(ExecutionContext *ctx, Value *result, const Value &base, const Value &index) { if (Object *o = base.asObject()) { - uint n = UINT_MAX; - if (index.isInteger()) - n = index.integerValue(); - else if (index.isDouble()) - n = index.doubleValue(); + uint n = index.asArrayIndex(); if (n < UINT_MAX) { Value res = Value::fromBoolean(o->deleteIndexedProperty(ctx, n)); if (result) |