Skip to content
Snippets Groups Projects
Commit 9314c48c authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix sub[] property setter - private data pointer type wrong

The private data pointer is no longer a subscan_t*. This likely explains the reported crashes when using DDMsgReader and the most recent changes (fixes) to the msg_area object.
parent e389f2e7
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1114 passed
...@@ -308,10 +308,14 @@ static JSBool js_sub_set(JSContext *cx, JSObject *obj, jsid id, JSBool strict, j ...@@ -308,10 +308,14 @@ static JSBool js_sub_set(JSContext *cx, JSObject *obj, jsid id, JSBool strict, j
jsval idval; jsval idval;
int32 val=0; int32 val=0;
jsint tiny; jsint tiny;
subscan_t* scan; struct js_msg_area_priv *p;
if((p=(struct js_msg_area_priv*)JS_GetPrivate(cx, obj))==NULL)
return JS_FALSE;
if((scan=(subscan_t*)JS_GetPrivate(cx,obj))==NULL) subscan_t* scan = p->subscan;
return(JS_TRUE); if(scan == NULL)
return JS_FALSE;
JS_IdToValue(cx, id, &idval); JS_IdToValue(cx, id, &idval);
tiny = JSVAL_TO_INT(idval); tiny = JSVAL_TO_INT(idval);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment