From c8d2160f3aa9b6709874c9cf4a634a46728d6cc6 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 6 Oct 2009 11:19:40 +0200 Subject: QtScript: Another crash fix on PowerPC on 32bit PowerPC, the integer value and the pointer value are not in the same word leading to crash. So blindly casting between them lead to crashes. Use the new Register::withInt instead Reviewed-by: Kent Hansen --- src/script/api/qscriptengine.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/script') diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 3402190768..863ac30f32 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -1116,8 +1116,7 @@ uint QScriptEnginePrivate::contextFlags(JSC::ExecState *exec) void QScriptEnginePrivate::setContextFlags(JSC::ExecState *exec, uint flags) { Q_ASSERT(!exec->codeBlock()); - quintptr flag_ptr = flags; - exec->registers()[JSC::RegisterFile::ReturnValueRegister] = JSC::JSValue(reinterpret_cast(flag_ptr)); + exec->registers()[JSC::RegisterFile::ReturnValueRegister] = JSC::Register::withInt(flags); } -- cgit v1.2.1