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).
This commit is contained in:
arookas 2015-12-23 20:08:54 -05:00
parent 7672bea631
commit ac51f19b85

View file

@ -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)
{