Fix box name write for sav8swsh

only used via the view-all-boxes popup when switching boxes
ty anubis!
This commit is contained in:
Kurt 2020-01-20 22:04:52 -08:00
parent 6fdc71b2e4
commit b84cae9ff5

View File

@ -8,7 +8,7 @@ public sealed class BoxLayout8 : SaveBlock
public BoxLayout8(SAV8SWSH sav, SCBlock block) : base(sav, block.Data) { }
private int GetBoxNameOffset(int box) => SAV6.LongStringLength * box;
private static int GetBoxNameOffset(int box) => SAV6.LongStringLength * box;
public string GetBoxName(int box)
{
@ -18,7 +18,7 @@ public string GetBoxName(int box)
public void SetBoxName(int box, string value)
{
var data = SAV.SetString(value, strlen, strlen, 0);
var offset = GetBoxNameOffset(box) + (SAV6.LongStringLength * box);
var offset = GetBoxNameOffset(box);
SAV.SetData(Data, data, offset);
}