Initialize UC when reading page size

This commit is contained in:
lazymio 2021-11-04 18:39:38 +01:00
parent dfbffa44ec
commit ebe1f83293
No known key found for this signature in database
GPG Key ID: DFF27E34A47CB873

2
uc.c
View File

@ -1969,6 +1969,8 @@ uc_err uc_ctl(uc_engine *uc, uc_control_type control, ...)
case UC_CTL_UC_PAGE_SIZE: {
if (rw == UC_CTL_IO_READ) {
UC_INIT(uc);
uint32_t *page_size = va_arg(args, uint32_t *);
*page_size = uc->target_page_size;