diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-07-16 10:04:58 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-07-16 10:05:31 (GMT) |
commit | b6e5b8116ed297cdc127485c914e461d0cf7c56b (patch) | |
tree | 4dfc7579f58fe85cb5030797da2b0c64fb88e36f /src/script/api | |
parent | adb1182d4cb600f48b5858dd78b4b6a6c43a89cd (diff) | |
download | Qt-b6e5b8116ed297cdc127485c914e461d0cf7c56b.zip Qt-b6e5b8116ed297cdc127485c914e461d0cf7c56b.tar.gz Qt-b6e5b8116ed297cdc127485c914e461d0cf7c56b.tar.bz2 |
fix bug in built-in print() function
D'oh, inverse logic.
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 116e449..b5ba4ff 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -661,10 +661,9 @@ JSC::JSValue functionPrint(JSC::ExecState* exec, JSC::JSObject*, JSC::JSValue, c break; result.append(s); } - if (!exec->hadException()) { - qDebug(qPrintable(result)); + if (exec->hadException()) return exec->exception(); - } + qDebug(qPrintable(result)); return JSC::jsUndefined(); } |