diff --git a/src/Assembleur.cpp b/src/Assembleur.cpp index 8eb759d..e0304ed 100644 --- a/src/Assembleur.cpp +++ b/src/Assembleur.cpp @@ -69,7 +69,8 @@ std::uint32_t Assembleur::ParseLabel(const std::string& a_Label) { throw std::invalid_argument("Label " + a_Label + " not found !"); } - return it->second; + // the address starts at 0, not 1 + return it->second - 1; } void Assembleur::AddLabel(const std::string& a_Label, std::uint32_t a_Line) {