Explorar o código

Fixed index out of bounds bug that occured during execution.

Taddeus Kroes %!s(int64=14) %!d(string=hai) anos
pai
achega
9d97e660f3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/statement.py

+ 1 - 1
src/statement.py

@@ -245,7 +245,7 @@ class Block:
 
 
     def end(self):
     def end(self):
         """Check if the pointer is at the end of the statement list."""
         """Check if the pointer is at the end of the statement list."""
-        return self.pointer == len(self)
+        return self.pointer >= len(self)
 
 
     def peek(self, count=1):
     def peek(self, count=1):
         """Read the statements until an offset from the current pointer
         """Read the statements until an offset from the current pointer