diff --git a/Saves/SAV6.cs b/Saves/SAV6.cs index 233062253..ea2d22dfa 100644 --- a/Saves/SAV6.cs +++ b/Saves/SAV6.cs @@ -646,7 +646,8 @@ public override int getBoxOffset(int box) } public override int getBoxWallpaper(int box) { - return 1 + Data[PCBackgrounds + box]; + int ofs = PCBackgrounds > 0 && PCBackgrounds < Data.Length ? PCBackgrounds : 0; + return Data[ofs + box]; } public override string getBoxName(int box) { diff --git a/Subforms/Save Editors/Gen6/SAV_BoxLayout.cs b/Subforms/Save Editors/Gen6/SAV_BoxLayout.cs index 391905559..671edb669 100644 --- a/Subforms/Save Editors/Gen6/SAV_BoxLayout.cs +++ b/Subforms/Save Editors/Gen6/SAV_BoxLayout.cs @@ -60,7 +60,7 @@ private void changeBoxBG(object sender, EventArgs e) if (!editing) SAV.Data[SAV.PCBackgrounds + LB_BoxSelect.SelectedIndex] = (byte)CB_BG.SelectedIndex; - PAN_BG.BackgroundImage = BoxWallpaper.getWallpaper(SAV, CB_BG.SelectedIndex + 1); + PAN_BG.BackgroundImage = BoxWallpaper.getWallpaper(SAV, CB_BG.SelectedIndex); } } } \ No newline at end of file