From 9a38c75a100e33da7312527fcd4ccd304cb9a336 Mon Sep 17 00:00:00 2001 From: NikVolf Date: Tue, 6 Jun 2017 12:22:41 +0300 Subject: [PATCH] and working address.wast --- src/interpreter/memory.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interpreter/memory.rs b/src/interpreter/memory.rs index 1618bad..35ee0a4 100644 --- a/src/interpreter/memory.rs +++ b/src/interpreter/memory.rs @@ -44,7 +44,7 @@ impl MemoryInstance { }; let buffer = self.buffer.read(); - if buffer.len() <= end { + if buffer.len() < end { return Err(Error::Memory(format!("trying to read region [{}..{}] in memory [0..{}]", begin, end, buffer.len()))); }