From 69280c12138763a047cfb62bc066a37d67db2c2c Mon Sep 17 00:00:00 2001 From: jvyden Date: Mon, 18 Oct 2021 10:21:34 -0400 Subject: [PATCH] Add comment explaining why length as byte is problematic --- UnionPatcher/Patcher.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UnionPatcher/Patcher.cs b/UnionPatcher/Patcher.cs index 03f103b..deaffbd 100644 --- a/UnionPatcher/Patcher.cs +++ b/UnionPatcher/Patcher.cs @@ -23,7 +23,8 @@ namespace UnionPatcher { using MemoryStream ms = new(data); using BinaryWriter writer = new(ms); - // using writer.Write(string) writes the length as a byte beforehand which is problematic + // using writer.Write(string) writes the length as a byte beforehand which is problematic because + // LBP uses null-terminated strings, not length-defined strings byte[] serverUrlAsBytes = Encoding.ASCII.GetBytes(serverUrl); foreach(string url in ToBePatched) {