Fixed incorrect number of history entries

This commit is contained in:
Eduard Urbach 2025-02-12 15:00:19 +01:00
parent 77d354936c
commit 5f8b859f4a
Signed by: eduard
GPG key ID: 49226B848C78F6C8
9 changed files with 39 additions and 20 deletions

View file

@ -32,14 +32,6 @@ func (a *Assembler) DLLCall(name string) {
// Return returns back to the caller.
func (a *Assembler) Return() {
if len(a.Instructions) > 0 {
lastMnemonic := a.Instructions[len(a.Instructions)-1].Mnemonic
if lastMnemonic == RETURN || lastMnemonic == JUMP {
return
}
}
a.Instructions = append(a.Instructions, Instruction{Mnemonic: RETURN})
}