From 76bea943bd896aea81e393ac0bc67d595ab0d564 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 28 Nov 2016 23:33:06 -0800 Subject: [PATCH] Disable empty string => [~#] conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PKM Form text file has many empty ("") lines, do not replace by default. Looks like ยง ingame. --- pk3DS/Tools/TextFile.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pk3DS/Tools/TextFile.cs b/pk3DS/Tools/TextFile.cs index 298332d..8d1bd2b 100644 --- a/pk3DS/Tools/TextFile.cs +++ b/pk3DS/Tools/TextFile.cs @@ -16,7 +16,7 @@ public class TextFile private const ushort KEY_TEXTCLEAR = 0xBE01; private const ushort KEY_TEXTWAIT = 0xBE02; private const ushort KEY_TEXTNULL = 0xBDFF; - private const bool SETEMPTYTEXT = true; + private const bool SETEMPTYTEXT = false; private static readonly byte[] emptyTextFile = { 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 }; public TextFile(byte[] data = null) @@ -98,7 +98,7 @@ public string[] Lines int bytesUsed = 0; for (int i = 0; i < lines.Length; i++) { - string text = (value[i] ?? "").Trim(); // ReSharper disable once RedundantLogicalConditionalExpressionOperand + string text = (value[i] ?? "").Trim(); if (text.Length == 0 && SETEMPTYTEXT) text = $"[~ {i}]"; byte[] DecryptedLineData = getLineData(text);