From 20f13df4eda12bb9bdb6b9c720307d9e02ef9c3b Mon Sep 17 00:00:00 2001 From: Joshua Roys Date: Tue, 7 Jun 2011 14:31:17 -0400 Subject: [PATCH 2/2] Fix anonymous function return for callExternal --- src/plugin/npscriptobject.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugin/npscriptobject.cpp b/src/plugin/npscriptobject.cpp index 745b9f9..9026271 100644 --- a/src/plugin/npscriptobject.cpp +++ b/src/plugin/npscriptobject.cpp @@ -787,10 +787,10 @@ bool NPScriptObject::callExternal(const lightspark::ExtIdentifier& id, argsString += buf; } - std::string scriptString = "function("; + std::string scriptString = "(function("; scriptString += argsString; scriptString += ") { return (" + id.getString(); - scriptString += ")(" + argsString + "); }"; + scriptString += ")(" + argsString + "); })"; LOG(LOG_CALLS,"Invoking " << scriptString << " in the browser "); -- 1.7.1