From 3e92b8c5ab74cd47920f5abda780fdd214f429fd Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 26 Nov 2019 08:53:09 -0600 Subject: [PATCH] pjm import - account junk white space at the ened of the file --- BizHawk.Client.Common/movie/import/PjmImport.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BizHawk.Client.Common/movie/import/PjmImport.cs b/BizHawk.Client.Common/movie/import/PjmImport.cs index 784dd30c7e..5cd381dc2e 100644 --- a/BizHawk.Client.Common/movie/import/PjmImport.cs +++ b/BizHawk.Client.Common/movie/import/PjmImport.cs @@ -309,6 +309,12 @@ namespace BizHawk.Client.Common { var mnemonicStr = new string(br.ReadChars(strCount)); + // Junk whitespace at the end of a file + if (string.IsNullOrWhiteSpace(mnemonicStr)) + { + continue; + } + // Gross, if not CR LF, this will fail, but will the PSXjin? if (!mnemonicStr.EndsWith("|\r\n")) {