Changeset 1676 for libemu

Show
Ignore:
Timestamp:
07/31/08 12:30:41 (1 month ago)
Author:
common
Message:

libemu

  • fix bug introduced by making profiles optional, env->env.win->loaded_dlls[i]->baseaddr is invalid if we found it, as the loop does not stop
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libemu/trunk/src/environment/win32/env_w32_dll_export_kernel32_hooks.c

    r1672 r1676  
    752752 
    753753 
    754         int i
     754        int i=0
    755755        int found_dll = 0; 
    756756        for (i=0; env->env.win->loaded_dlls[i] != NULL; i++) 
     
    761761                        emu_cpu_reg32_set(c, eax, env->env.win->loaded_dlls[i]->baseaddr); 
    762762                        found_dll = 1; 
     763                        break; 
    763764                } 
    764765        } 
     
    786787                if (found_dll == 1) 
    787788                { 
    788                         emu_profile_function_returnvalue_ptr_set(env->profile, "HMODULE", env->env.win->loaded_dlls[i]->baseaddr); 
     789                        emu_profile_function_returnvalue_ptr_set(env->profile, "HMODULE", c->reg[eax]); 
    789790                        emu_profile_argument_add_none(env->profile); 
    790791                }else