From 3ce0264fd3a5e60aa9961a028141c68a79746375 Mon Sep 17 00:00:00 2001 From: Tony Konzel Date: Wed, 9 Mar 2016 20:35:56 -0600 Subject: [PATCH] C64: Actually use the correct data and length when building PRGs onto disk images. --- .../Computers/Commodore64/Media/DiskBuilder.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/Media/DiskBuilder.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/Media/DiskBuilder.cs index cd0f5d2a62..b987b44ff8 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/Media/DiskBuilder.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/Media/DiskBuilder.cs @@ -200,6 +200,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Media { Array.Copy(entry.Data, sourceOffset, bytes, outputOffset + 2, 254); dataRemaining -= 254; + sourceOffset += 254; } else { @@ -207,7 +208,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Media { Array.Copy(entry.Data, sourceOffset, bytes, outputOffset + 2, dataRemaining); bytes[outputOffset + 0] = 0; - bytes[outputOffset + 1] = (byte) dataRemaining; + bytes[outputOffset + 1] = (byte)(dataRemaining + 1); dataRemaining = 0; } }