Skip to content

Commit f9d3d91

Browse files
committed
Fix width for SNES Action Replay cheatcode decoder, add test case
1 parent ae6ff1d commit f9d3d91

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/BizHawk.Client.Common/cheats/SnesActionReplayDecoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static IDecodeResult Decode(string code)
2222

2323
return new DecodeResult
2424
{
25-
Size = WatchSize.Word,
25+
Size = WatchSize.Byte,
2626
Address = int.Parse(code.Remove(6, 2), NumberStyles.HexNumber),
2727
Value = int.Parse(code.Remove(0, 6), NumberStyles.HexNumber)
2828
};

src/BizHawk.Tests/Client.Common/cheats/CheatDecoderTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ private sealed class CheatcodeDataAttribute : Attribute, ITestDataSource
5252
new object?[] { VSystemID.Raw.GB, "BE0-37B-08C", 0x4037, 0xBE, 0xB9, WatchSize.Byte },
5353
new object?[] { VSystemID.Raw.GBA, "4012F5B7 3B7801A6", 0x00000006, 0xB7, NO_COMPARE, WatchSize.Byte },
5454
new object?[] { VSystemID.Raw.GBA, "686D7FC3 24B5B832", 0x00000032, 0x7FC3, NO_COMPARE, WatchSize.Word },
55+
new object?[] { VSystemID.Raw.SNES, "7E1F2801", 0x7E1F28, 0x01, NO_COMPARE, WatchSize.Byte },
5556
};
5657

5758
[DataTestMethod]

0 commit comments

Comments
 (0)