jscript: Access the PROTREF with proper index instead of get_prop.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2021-11-24 16:10:36 +02:00 committed by Alexandre Julliard
parent 5842ec60e2
commit 8b3afbe402
1 changed files with 6 additions and 2 deletions

View File

@ -109,8 +109,12 @@ static inline BOOL is_function_prop(dispex_prop_t *prop)
static DWORD get_flags(jsdisp_t *This, dispex_prop_t *prop)
{
if(prop->type == PROP_PROTREF) {
dispex_prop_t *parent = get_prop(This->prototype, prop->u.ref);
if(!parent) {
dispex_prop_t *parent = NULL;
if(prop->u.ref < This->prototype->prop_cnt)
parent = &This->prototype->props[prop->u.ref];
if(!parent || parent->type == PROP_DELETED) {
prop->type = PROP_DELETED;
return 0;
}