diff --git a/bdshemu/bdshemu.c b/bdshemu/bdshemu.c index 4a4e4a6..d2926ca 100644 --- a/bdshemu/bdshemu.c +++ b/bdshemu/bdshemu.c @@ -2226,9 +2226,14 @@ ShemuEmulate( break; case ND_INS_NEG: - GET_OP(Context, 0, &dst); - dst.Value.Qwords[0] = 0 - dst.Value.Qwords[0]; - SET_OP(Context, 0, &dst); + GET_OP(Context, 0, &src); + dst.Size = src.Size; + dst.Value.Qwords[0] = 0; + res.Size = src.Size; + res.Value.Qwords[0] = dst.Value.Qwords[0] - src.Value.Qwords[0]; + SET_OP(Context, 0, &res); + SET_FLAGS(Context, res, dst, src, FM_SUB); + SET_FLAG(Context, NDR_RFLAG_CF, src.Value.Qwords[0] != 0); break; case ND_INS_BT: diff --git a/bdshemu_test/bdshemu_test.zip b/bdshemu_test/bdshemu_test.zip index 973c7aa..fcddd80 100644 Binary files a/bdshemu_test/bdshemu_test.zip and b/bdshemu_test/bdshemu_test.zip differ diff --git a/inc/version.h b/inc/version.h index 3a2d5a5..4060e9b 100644 --- a/inc/version.h +++ b/inc/version.h @@ -7,6 +7,6 @@ #define DISASM_VERSION_MAJOR 1 #define DISASM_VERSION_MINOR 34 -#define DISASM_VERSION_REVISION 0 +#define DISASM_VERSION_REVISION 1 #endif // DISASM_VER_H diff --git a/pybddisasm/setup.py b/pybddisasm/setup.py index 7cafe38..1a5abd4 100644 --- a/pybddisasm/setup.py +++ b/pybddisasm/setup.py @@ -12,7 +12,7 @@ from setuptools import find_packages, setup, Command, Extension, Distribution from codecs import open VERSION = (0, 1, 3) -LIBRARY_VERSION = (1, 34, 0) +LIBRARY_VERSION = (1, 34, 1) LIBRARY_INSTRUX_SIZE = 864 packages = ['pybddisasm']