string.Trim doesn't remove NUL
I'm also skeptical of the `if (bs93/*=br.ReadBytes(6)*/ == "BS93") { ... }` just after this, it doesn't seem the condition can ever be met...
This commit is contained in:
parent
c1a734a04d
commit
966b8a974a
|
@ -2,6 +2,7 @@
|
|||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Common.StringExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Atari.Lynx
|
||||
|
@ -32,8 +33,8 @@ namespace BizHawk.Emulation.Cores.Atari.Lynx
|
|||
int p0 = br.ReadUInt16();
|
||||
int p1 = br.ReadUInt16();
|
||||
int ver = br.ReadUInt16();
|
||||
string cname = Encoding.ASCII.GetString(br.ReadBytes(32)).Trim();
|
||||
string mname = Encoding.ASCII.GetString(br.ReadBytes(16)).Trim();
|
||||
string cname = Encoding.ASCII.GetString(br.ReadBytes(32)).SubstringBefore('\0').Trim();
|
||||
string mname = Encoding.ASCII.GetString(br.ReadBytes(16)).SubstringBefore('\0').Trim();
|
||||
int rot = br.ReadByte();
|
||||
|
||||
ms.Position = 6;
|
||||
|
|
Loading…
Reference in New Issue