fix label address
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user