We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f88a063 commit 26d7c90Copy full SHA for 26d7c90
1 file changed
MiloLib/Classes/Symbol.cs
@@ -29,10 +29,11 @@ public override string ToString()
29
return chars;
30
}
31
32
+ // TODO: move the register provider to a more global place, this is shit
33
+
34
public static Symbol Read(EndianReader reader)
35
{
36
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
-
37
uint length = reader.ReadUInt32();
38
39
if (length > 512)
@@ -47,6 +48,7 @@ public static Symbol Read(EndianReader reader)
47
48
49
public static void Write(EndianWriter writer, Symbol lengthString)
50
51
+ Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
52
byte[] bytes = Encoding.GetEncoding("Windows-1252").GetBytes(lengthString.chars);
53
writer.WriteUInt32((uint)bytes.Length);
54
writer.WriteBlock(bytes);
0 commit comments