From ac51f19b85735762c8947d3f68928ed2d07421fa Mon Sep 17 00:00:00 2001 From: arookas Date: Wed, 23 Dec 2015 20:08:54 -0500 Subject: [PATCH] Fixed: correctly calculate symbol-name lengths. Even though the grammar promises us the symbol names will never occupy more than one byte per character, it's good practice to add this anyway (since we already do it for the data table). --- ssc/symbol table.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssc/symbol table.cs b/ssc/symbol table.cs index eb8518d..b647e35 100644 --- a/ssc/symbol table.cs +++ b/ssc/symbol table.cs @@ -37,7 +37,7 @@ namespace arookas writer.WriteS32(0); writer.WriteS32(0); - ofs += sym.Name.Length + 1; // include null terminator + ofs += writer.Encoding.GetByteCount(sym.Name) + 1; // include null terminator } foreach (var sym in this) {