summaryrefslogtreecommitdiffstats
path: root/src/script/api
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-07-09 09:40:52 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-07-09 09:40:52 (GMT)
commitd8cde61540b94e36a759d9d6a5adbb432f3625ea (patch)
tree3b580b65bffa2fa21b28d77729e52cf5e65770b7 /src/script/api
parentbbe31f2e8842e032139fde0f58740cd181eeacd9 (diff)
downloadQt-d8cde61540b94e36a759d9d6a5adbb432f3625ea.zip
Qt-d8cde61540b94e36a759d9d6a5adbb432f3625ea.tar.gz
Qt-d8cde61540b94e36a759d9d6a5adbb432f3625ea.tar.bz2
make arguments object work for native functions
There's an off-by-one issue that we just work around for now.
Diffstat (limited to 'src/script/api')
-rw-r--r--src/script/api/qscriptcontext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp
index c70b3d4..ed631bf 100644
--- a/src/script/api/qscriptcontext.cpp
+++ b/src/script/api/qscriptcontext.cpp
@@ -302,7 +302,7 @@ QScriptValue QScriptContext::argument(int index) const
return QScriptValue(QScriptValue::UndefinedValue);
JSC::Register* thisRegister = d->frame->registers() - JSC::RegisterFile::CallFrameHeaderSize - d->frame->argumentCount();
if (d->frame->codeBlock() == 0)
- ++index;
+ ++index; // ### off-by-one issue with native functions
return d->engine->scriptValueFromJSCValue(thisRegister[index].jsValue());
}