diff --git a/include/lime/instruction.hpp b/include/lime/instruction.hpp index 1ad6d5c..8567f96 100644 --- a/include/lime/instruction.hpp +++ b/include/lime/instruction.hpp @@ -68,7 +68,7 @@ namespace lime public: [[nodiscard]] std::optional next() const; - [[lime::inaccurate]] [[nodiscard]] std::optional prev() const; + [[nodiscard]] std::optional prev() const; public: [[nodiscard]] std::optional follow() const; diff --git a/src/instruction.cpp b/src/instruction.cpp index 030bd1b..b86e99d 100644 --- a/src/instruction.cpp +++ b/src/instruction.cpp @@ -83,7 +83,22 @@ namespace lime const auto next = instruction->next(); - if (!next || next->addr() != m_impl->address) + if (!next) + { + continue; + } + + if (next->addr() != m_impl->address) + { + continue; + } + + if (next->size() != size()) + { + continue; + } + + if (next->mnemonic() != mnemonic()) { continue; }