Skip to content
Snippets Groups Projects
Commit 1c27d70c authored by rswindell's avatar rswindell
Browse files

Bugfix: sub.scan_cfg, scan_ptr, and last_read properties were using the wrong

private data pointer (context instead of object).
parent 6752a562
Branches
Tags
No related merge requests found
......@@ -253,7 +253,7 @@ static JSBool js_sub_get(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
jsint tiny;
subscan_t* scan;
if((scan=(subscan_t*)JS_GetContextPrivate(cx))==NULL)
if((scan=(subscan_t*)JS_GetPrivate(cx,obj))==NULL)
return(JS_TRUE);
tiny = JSVAL_TO_INT(id);
......@@ -279,7 +279,7 @@ static JSBool js_sub_set(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
jsint tiny;
subscan_t* scan;
if((scan=(subscan_t*)JS_GetContextPrivate(cx))==NULL)
if((scan=(subscan_t*)JS_GetPrivate(cx,obj))==NULL)
return(JS_TRUE);
tiny = JSVAL_TO_INT(id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment