diff --git a/src/construct_flags.cpp b/src/construct_flags.cpp index 5da4f90..33f3dc9 100644 --- a/src/construct_flags.cpp +++ b/src/construct_flags.cpp @@ -9,20 +9,20 @@ using namespace std; int set_bitwidth(char* argv) { - if (string(argv) == "elf64") { - bitwidth = BIT64; - return 0; - } - if (string(argv) == "elf32") { - bitwidth = BIT32; + if (string(argv) == "elf8") { + bitwidth = BIT8; return 0; } if (string(argv) == "elf16") { bitwidth = BIT16; return 0; } - if (string(argv) == "elf8") { - bitwidth = BIT8; + if (string(argv) == "elf32") { + bitwidth = BIT32; + return 0; + } + if (string(argv) == "elf64") { + bitwidth = BIT64; return 0; } cout << "\"" << argv << "\" not a supported format" << endl; diff --git a/src/reconstruct.cpp b/src/reconstruct.cpp index f0e0f7f..03a7054 100644 --- a/src/reconstruct.cpp +++ b/src/reconstruct.cpp @@ -156,7 +156,6 @@ static void apply_macro_to_token(con_token& token, vector macros) (pos = token.tok_while->condition.arg1.find(crntmacro->macro)) != string::npos && (pos == 0 || !isalpha(token.tok_while->condition.arg1[pos-1])) && (pos == token.tok_while->condition.arg1.size()-1 || !isalpha(token.tok_while->condition.arg1[pos+crntmacro->macro.size()]))) { - token.tok_while->condition.arg1.replace(pos, crntmacro->macro.size(), crntmacro->value); } if (!token.tok_while->condition.arg2.empty() &&