Skip to content

Commit

Permalink
#17 Trim both \0 and in cartridge name
Browse files Browse the repository at this point in the history
  • Loading branch information
hagronnestad committed Apr 16, 2020
1 parent 22b869d commit 112dbf7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static CrtHeader FromBytes(byte[] data) {
h.HardwareType = (CrtHardwareType) BitConverter.ToUInt16(data.Skip(0x16).Take(sizeof(UInt16)).Reverse().ToArray(), 0);
h.ExRomLine = data[0x18];
h.GameLine = data[0x19];
h.Name = Encoding.ASCII.GetString(data, 0x20, 0x20).Trim('\0');
h.Name = Encoding.ASCII.GetString(data, 0x20, 0x20).Trim('\0', ' ');


return h;
Expand Down

0 comments on commit 112dbf7

Please sign in to comment.