Init uc on cpu model read

This commit is contained in:
lazymio
2021-11-04 20:00:01 +01:00
parent 613ddf0985
commit 025e32df4a

3
uc.c
View File

@ -2065,6 +2065,9 @@ uc_err uc_ctl(uc_engine *uc, uc_control_type control, ...)
case UC_CTL_CPU_MODEL: { case UC_CTL_CPU_MODEL: {
if (rw == UC_CTL_IO_READ) { if (rw == UC_CTL_IO_READ) {
UC_INIT(uc);
int *model = va_arg(args, int *); int *model = va_arg(args, int *);
*model = uc->cpu_model; *model = uc->cpu_model;
} else { } else {