diff --git a/src/Assembleur.cpp b/src/Assembleur.cpp index d99c11e..17ce3fd 100644 --- a/src/Assembleur.cpp +++ b/src/Assembleur.cpp @@ -1,5 +1,6 @@ #include "Assembleur.h" +#include #include #include #include @@ -122,6 +123,9 @@ std::uint32_t Assembleur::ParseInstruction(const std::string& a_Str, std::uint32 std::string ins; ss >> ins; + // to lower case + std::transform(ins.begin(), ins.end(), ins.begin(), [](unsigned char c) { return std::tolower(c); }); + auto it = INSTRUCTION_KEYS.find(ins); if (it == INSTRUCTION_KEYS.end()) { throw std::invalid_argument("[Line " + std::to_string(a_RealLine) + "] " + "Instruction \"" + ins + "\" not found !");