From 036a3d321a2eae6bc2c93d9041fa5289964e2a81 Mon Sep 17 00:00:00 2001 From: Udo Held Date: Sun, 14 Jan 2018 11:18:07 +1100 Subject: [PATCH] Fix for #1094 lua mainmemory.readbyterange() issue --- BizHawk.Client.Common/lua/LuaMemoryBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BizHawk.Client.Common/lua/LuaMemoryBase.cs b/BizHawk.Client.Common/lua/LuaMemoryBase.cs index 683ee68cfe..b0b814983c 100644 --- a/BizHawk.Client.Common/lua/LuaMemoryBase.cs +++ b/BizHawk.Client.Common/lua/LuaMemoryBase.cs @@ -177,7 +177,7 @@ namespace BizHawk.Client.Common var d = string.IsNullOrEmpty(domain) ? Domain : DomainList[VerifyMemoryDomain(domain)]; var lastAddr = length + addr; var table = Lua.NewTable(); - if (lastAddr < d.Size) + if (lastAddr <= d.Size) { for (var i = 0; i < length; i++) {