Init uc on cpu model read

This commit is contained in:
lazymio 2021-11-04 20:00:01 +01:00
parent 613ddf0985
commit 025e32df4a
No known key found for this signature in database
GPG Key ID: DFF27E34A47CB873

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: {
if (rw == UC_CTL_IO_READ) {
UC_INIT(uc);
int *model = va_arg(args, int *);
*model = uc->cpu_model;
} else {