diff --git a/src/sbbs3/js_internal.c b/src/sbbs3/js_internal.c
index 51e19a40ace6e38f66bb75febc03fc1071a5fb02..b08439089ffc04d22785c387dac1cb71c1a8e84e 100644
--- a/src/sbbs3/js_internal.c
+++ b/src/sbbs3/js_internal.c
@@ -271,7 +271,7 @@ js_eval(JSContext *parent_cx, uintN argc, jsval *arglist)
 
 	if((str=JS_ValueToString(parent_cx, argv[0]))==NULL)
 		return(JS_FALSE);
-	JSSTRING_TO_STRING(cx, str, buf, NULL);
+	JSSTRING_TO_STRING(parent_cx, str, buf, NULL);
 	if(buf==NULL)
 		return(JS_FALSE);
 	buflen=JS_GetStringLength(str);