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

Fixed bug (argv[1] reference) in js_readbin().

parent 979c70e9
No related branches found
No related tags found
No related merge requests found
......@@ -282,8 +282,8 @@ js_readbin(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
if(p->fp==NULL)
return(JS_TRUE);
if(argc>1)
size = JSVAL_TO_INT(argv[1]);
if(argc)
size = JSVAL_TO_INT(argv[0]);
switch(size) {
case sizeof(BYTE):
......
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