diff --git a/Tables/tables.c b/Tables/tables.c index 3de4918..af30499 100644 --- a/Tables/tables.c +++ b/Tables/tables.c @@ -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) { - 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; + 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) {