From 6ec046e61681a1d3d65258ea79f98594a8a85d79 Mon Sep 17 00:00:00 2001
From: tatyana <tatyana@etersoft.ru>
Date: Mon, 1 Apr 2013 19:35:57 +0400
Subject: [PATCH] Revert "mshtml: Prevent duplicating members (eterbug #8128)."

This reverts commit c64781813a5e7d9ebe8273f572158189b7574efb.
---
 dlls/mshtml/dispex.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
index ddfa795..38d9df4 100644
--- a/dlls/mshtml/dispex.c
+++ b/dlls/mshtml/dispex.c
@@ -227,15 +227,12 @@ static BOOL is_arg_type_supported(VARTYPE vt)
 
 static void add_func_info(dispex_data_t *data, DWORD *size, tid_t tid, const FUNCDESC *desc, ITypeInfo *dti)
 {
-    func_info_t *info = NULL;
+    func_info_t *info;
     HRESULT hres;
-    DWORD i;
-
-    for(i = 0; i < data->func_cnt; i++)
-        if(data->funcs[i].id == desc->memid)
-            info = data->funcs+data->func_cnt-1;
 
-    if(!info) {
+    if(data->func_cnt && data->funcs[data->func_cnt-1].id == desc->memid) {
+        info = data->funcs+data->func_cnt-1;
+    }else {
         if(data->func_cnt == *size)
             data->funcs = heap_realloc_zero(data->funcs, (*size <<= 1)*sizeof(func_info_t));
 
-- 
1.8.1.5
