From f3cb4feec4ff271130a0d6e34778d6d3acb19d3b Mon Sep 17 00:00:00 2001 From: lazymio Date: Mon, 1 Nov 2021 10:39:31 +0100 Subject: [PATCH] Fix build on Windows --- uc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uc.c b/uc.c index 3d765be4..dc52ce8b 100644 --- a/uc.c +++ b/uc.c @@ -1800,7 +1800,8 @@ uc_err uc_ctl(uc_engine *uc, uc_control_type control, ...) uc_err err = UC_ERR_OK; va_list args; - rw = control >> 30; + // MSVC Would do signed shift on signed integers. + rw = (uint32_t)control >> 30; type = (control & ((1 << 16) - 1)); va_start(args, control);