Correctif merge

This commit is contained in:
Paul Faure 2021-06-24 15:20:33 +02:00
parent 3efa8d5ef2
commit 9b91ac0036

View file

@ -193,12 +193,19 @@ void execute() {
printf("%d@%d\n", mem[check_adresse(ebp + programme[eip].param1)], ebp + programme[eip].param1);
} else if (programme[eip].instruction == CALL) {
if (SECURISED) {
pile[check_adresse_pile(esp)] = ebp;
esp++;
pile[check_adresse_pile(esp)] = eip + 1;
esp++;
ebp = ebp + programme[eip].param2;
eip = programme[eip].param1 - 1;
} else {
mem[check_adresse(ebp + programme[eip].param2)] = ebp;
mem[check_adresse(ebp + programme[eip].param2 + 1)] = eip + 1;
ebp = ebp + programme[eip].param2 + 2;
eip = programme[eip].param1 - 1;
}
} else if (programme[eip].instruction == RET) {
if (SECURISED) {