Fix null-terminated string writing (BinaryWriter prefixed it with a length byte which is unneeded).
parent
f9b647c38d
commit
9917ac4f9f
|
@ -32,12 +32,13 @@ namespace GarrysMod.AddonCreator
|
|||
|
||||
public static void Write(this BinaryWriter bw, string value, bool nullTerminated)
|
||||
{
|
||||
if (nullTerminated)
|
||||
if (!nullTerminated)
|
||||
{
|
||||
value += "\0";
|
||||
bw.Write(value);
|
||||
}
|
||||
|
||||
bw.Write(value);
|
||||
value += "\0";
|
||||
bw.Write(Encoding.GetEncoding("windows-1252").GetBytes(value));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue