From 9aaf1dcfa0f5d7179634ab50d414f63ed6d9d0b2 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 25 Mar 2014 03:41:13 +0200 Subject: [PATCH] plugin: don't overapply near ptr --- plugin/saveasm.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/saveasm.cpp b/plugin/saveasm.cpp index aee282f..8e1bc95 100644 --- a/plugin/saveasm.cpp +++ b/plugin/saveasm.cpp @@ -548,7 +548,9 @@ pass: } } else if (jmp_near) { - p = strchr(fw, 'j'); + p = NULL; + if (fw != buf && fw[0] == 'j') + p = fw; while (p && *p != ' ') p++; while (p && *p == ' ') @@ -556,6 +558,7 @@ pass: if (p != NULL) { memmove(p + 9, p, strlen(p) + 1); memcpy(p, "near ptr ", 9); + jmp_near = 0; } } if (word_imm) { -- 2.39.5