From 57aca407bc6f4657efed2be21c893cf0cd515a26 Mon Sep 17 00:00:00 2001 From: Shing Lyu Date: Thu, 7 Jun 2018 21:46:31 +0200 Subject: [PATCH] Fixed the test vm for a missed comparison operator --- parser/src/compiler/vm.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/src/compiler/vm.rs b/parser/src/compiler/vm.rs index c6c33e9747..d25de9b20b 100644 --- a/parser/src/compiler/vm.rs +++ b/parser/src/compiler/vm.rs @@ -56,7 +56,7 @@ impl VirtualMachine { loop { // for instruction in code.instructions { - if self.program_counter > current_frame.instructions.len() { + if self.program_counter >= current_frame.instructions.len() { break; }