Skip to content
Snippets Groups Projects
Commit e5cdc9a5 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Ok, let's just never change cur if it's valid? Ok?

Now the default bar is INT_MAX, so it always gets corrected when
left as default.

This is good.
parent 2da95710
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1248 passed
......@@ -346,6 +346,7 @@ static JSBool js_list_ctx_constructor(JSContext *cx, uintN argc, jsval *arglist)
JS_ReportError(cx, "JS_SetPrivate failed");
return JS_FALSE;
}
p->bar = INT_MAX;
js_SyncResolve(cx, obj, NULL, js_uifc_list_class_properties, NULL, NULL, 0);
#ifdef BUILD_JSDOCS
js_DescribeSyncObject(cx, obj, "Class used to retain UIFC list menu context", 317);
......
......@@ -927,11 +927,11 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
(*bar)=opts-1;
if((*bar)<0)
(*bar)=0;
if((*cur)<(*bar))
(*cur)=(*bar);
i=(*cur)-(*bar);
if(i+(height-vbrdrsize-1)>=opts) {
(*bar)=(height-vbrdrsize);
if (*bar > *cur)
*bar = *cur;
i=(*cur)-(*bar)+1;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment