From 56fcc07a7cb3db90ef0eaa0e65fe8538ad1bc24a Mon Sep 17 00:00:00 2001 From: lazymio Date: Mon, 8 Nov 2021 22:51:49 +0100 Subject: [PATCH] Add EXTRA field to uc_version --- include/unicorn/unicorn.h | 3 ++- uc.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/unicorn/unicorn.h b/include/unicorn/unicorn.h index fd341055..3c6bc2a1 100644 --- a/include/unicorn/unicorn.h +++ b/include/unicorn/unicorn.h @@ -70,11 +70,12 @@ typedef size_t uc_hook; // Unicorn API version #define UC_API_MAJOR 2 #define UC_API_MINOR 0 +#define UC_API_EXTRA 4 // Unicorn package version #define UC_VERSION_MAJOR UC_API_MAJOR #define UC_VERSION_MINOR UC_API_MINOR -#define UC_VERSION_EXTRA 0 +#define UC_VERSION_EXTRA UC_API_EXTRA /* Macro to create combined version which can be compared to diff --git a/uc.c b/uc.c index 1fc34fa6..4363d61c 100644 --- a/uc.c +++ b/uc.c @@ -35,7 +35,7 @@ unsigned int uc_version(unsigned int *major, unsigned int *minor) *minor = UC_API_MINOR; } - return (UC_API_MAJOR << 8) + UC_API_MINOR; + return (UC_API_EXTRA << 16) + (UC_API_MAJOR << 8) + UC_API_MINOR; } UNICORN_EXPORT