[Wine-patches] [eterhack] Revert "mshtml: Prevent duplicating members (eterbug #8128)." (eterbug #9331).

Dmitry Timoshkov dtimoshkov на etersoft.ru
Ср Июн 5 10:20:49 MSK 2013


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 6f293fb..54154aa 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.3



Подробная информация о списке рассылки Wine-patches