All pastes #2076318 Raw Edit

0002-Fix-anonymous-function-retu

public diff v1 · immutable
#2076318 ·published 2011-06-07 18:32 UTC
rendered paste body
From 20f13df4eda12bb9bdb6b9c720307d9e02ef9c3b Mon Sep 17 00:00:00 2001From: Joshua Roys <roysjosh@gmail.com>Date: Tue, 7 Jun 2011 14:31:17 -0400Subject: [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.cppindex 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