first_cpu is obsolete by recent changes

This commit is contained in:
Nguyen Anh Quynh 2016-10-07 10:10:18 +08:00
parent a6e8564153
commit 6c54f9ce48

4
uc.c
View File

@ -1181,7 +1181,7 @@ void *uc_context_save(uc_engine *uc, void *buffer)
buffer = malloc(sz);
}
memcpy(buffer, first_cpu->env_ptr, sz);
memcpy(buffer, uc->cpu->env_ptr, sz);
return buffer;
}
@ -1189,5 +1189,5 @@ UNICORN_EXPORT
void uc_context_restore(uc_engine *uc, void *buffer)
{
size_t sz = cpu_regs_size(uc->arch, uc->mode);
memcpy(first_cpu->env_ptr, buffer, sz);
memcpy(uc->cpu->env_ptr, buffer, sz);
}