fix stack over flow printing bug

This commit is contained in:
2023-03-13 20:14:44 +00:00
parent 0a85087bb9
commit cf25d392be
3 changed files with 1 additions and 7 deletions

View File

@@ -7,8 +7,7 @@ import (
// returns (number|string|nil), error
func runVal(line any, stack stack, stacklevel int) (any, ArErr) {
fmt.Println(stack)
if stacklevel > 10000 {
if stacklevel >= 10000 {
return nil, ArErr{
TYPE: "RuntimeError",
message: "stack overflow",