aboutsummaryrefslogtreecommitdiff
path: root/lib/x86/jump-patch.h
diff options
context:
space:
mode:
authorcomex2015-02-18 02:57:08 -0500
committercomex2015-02-18 02:57:08 -0500
commitce8cffd7cba9925779163fa4380f98b2f70f5a7b (patch)
treed5229e823757b8e836a28fd00ffd7bb1c67e4d7d /lib/x86/jump-patch.h
parenter, don't unnecessarily spam thread start/resume. (diff)
downloadsubstitute-ce8cffd7cba9925779163fa4380f98b2f70f5a7b.tar.gz
various fixes
Diffstat (limited to '')
-rw-r--r--lib/x86/jump-patch.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/x86/jump-patch.h b/lib/x86/jump-patch.h
index ca7b16c..569eb74 100644
--- a/lib/x86/jump-patch.h
+++ b/lib/x86/jump-patch.h
@@ -5,7 +5,7 @@
static inline int jump_patch_size(uint_tptr pc, uint_tptr dpc,
UNUSED struct arch_dis_ctx arch,
bool force) {
- uint_tptr diff = pc - (dpc + 5);
+ uint_tptr diff = dpc - (pc + 5);
/* fits in 32? */
if (diff == (uint_tptr) (int32_t) diff)
return 5;