fix label address

This commit is contained in:
2024-12-13 16:38:56 +01:00
parent ada82368d0
commit 0ae55ef466

View File

@@ -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) {