fixed stack error

This commit is contained in:
CPunch 2020-11-11 23:10:53 -06:00
parent c42a72dfad
commit 65662e94f2
2 changed files with 3 additions and 1 deletions

View File

@ -1018,7 +1018,9 @@ static void forLoop(CParseState *pstate) {
consume(pstate, TOKEN_DO, "Expected 'do'");
beginScope(pstate); // fixes stack issues
block(pstate); // parses until 'end'
endScope(pstate);
writeJmpBack(pstate, loopStart);

View File

@ -4,7 +4,7 @@ class test
end
function print(self, i)
local str = self.hello
var str = self.hello
for (var x = i; x > 0; x=x-1) do
str = str .. "!"