From 0d74bf74de066c0e14fd4901ae71c77d0754c1c3 Mon Sep 17 00:00:00 2001 From: tuz358 Date: Mon, 5 Mar 2018 17:18:43 +0900 Subject: [PATCH] set_flag: Fix bug due to mistake processing order --- instructions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instructions.cpp b/instructions.cpp index e66b860..ba79224 100644 --- a/instructions.cpp +++ b/instructions.cpp @@ -308,9 +308,9 @@ void Instructions::cmp_rm32_imm8(){ void Instructions::set_flag(int flag, uint32_t flag_type){ if (flag) { - this->eflags &= ~flag_type; - } else { this->eflags |= flag_type; + } else { + this->eflags &= ~flag_type; } }