C64: Actually use the correct data and length when building PRGs onto disk images.

This commit is contained in:
Tony Konzel 2016-03-09 20:35:56 -06:00
parent aa83c33c58
commit 3ce0264fd3
1 changed files with 2 additions and 1 deletions

View File

@ -200,6 +200,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Media
{ {
Array.Copy(entry.Data, sourceOffset, bytes, outputOffset + 2, 254); Array.Copy(entry.Data, sourceOffset, bytes, outputOffset + 2, 254);
dataRemaining -= 254; dataRemaining -= 254;
sourceOffset += 254;
} }
else else
{ {
@ -207,7 +208,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Media
{ {
Array.Copy(entry.Data, sourceOffset, bytes, outputOffset + 2, dataRemaining); Array.Copy(entry.Data, sourceOffset, bytes, outputOffset + 2, dataRemaining);
bytes[outputOffset + 0] = 0; bytes[outputOffset + 0] = 0;
bytes[outputOffset + 1] = (byte) dataRemaining; bytes[outputOffset + 1] = (byte)(dataRemaining + 1);
dataRemaining = 0; dataRemaining = 0;
} }
} }