[mw-devel] MW3 r917 - branches/jscript/src
arthur at sucs.org
arthur at sucs.org
Mon Mar 19 18:12:45 GMT 2007
Author: arthur
Date: 2007-03-19 18:12:45 +0000 (Mon, 19 Mar 2007)
New Revision: 917
Modified:
branches/jscript/src/js.c
Log:
fixes the whoami property, refs #13
Modified: branches/jscript/src/js.c
===================================================================
--- branches/jscript/src/js.c 2007-03-15 21:28:56 UTC (rev 916)
+++ branches/jscript/src/js.c 2007-03-19 18:12:45 UTC (rev 917)
@@ -509,7 +509,7 @@
ok = JS_DefineFunction(jscx, jsroot, "exec", js_mwexec, 1, 0);
ok = JS_DefineFunction(jscx, jsroot, "say", js_say, 1, 0);
- ok = JS_DefineProperty(jscx, jsroot, "whoami", STRING_TO_JSVAL(user->name), NULL, NULL, JSPROP_READONLY|JSPROP_PERMANENT);
+ ok = JS_DefineProperty(jscx, jsroot, "whoami", STRING_TO_JSVAL(JS_NewStringCopyZ(jscx,user->name)), NULL, NULL, JSPROP_READONLY|JSPROP_PERMANENT);
/* need additional functions :
* - one to bind functions to events (bind?)
More information about the mw-devel
mailing list