From e432e1755b76b32ceefd66c44338eb99ab38860c Mon Sep 17 00:00:00 2001 From: SoujiSeta Date: Sat, 3 Jan 2015 19:41:31 -0600 Subject: [PATCH 1/2] Fixed bug in the Super Training dialog in which the changeRecordVal function would attempt to copy 4 bytes from a 2 bytes array. --- SAV/SAV_SuperTrain.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SAV/SAV_SuperTrain.cs b/SAV/SAV_SuperTrain.cs index 202685995..43ea5042a 100644 --- a/SAV/SAV_SuperTrain.cs +++ b/SAV/SAV_SuperTrain.cs @@ -189,7 +189,7 @@ private void changeRecordVal(object sender, EventArgs e) { byte[] data = BitConverter.GetBytes(UInt16.Parse(TB_Unk.Text)); Array.Resize(ref data, 2); - Array.Copy(data, 0, sav, offsetVal + 4 * index, 4); + Array.Copy(data, 0, sav, offsetVal + 4 * index, 2); } catch { return; } } From ba97983a7f5d0912e84649d61f7c89b47ecdaee5 Mon Sep 17 00:00:00 2001 From: SoujiSeta Date: Sat, 3 Jan 2015 19:44:06 -0600 Subject: [PATCH 2/2] Fixed issue which only occurs when running Mono in which calling Add on a DataGridViewRowCollection could set the first row's cell to be in edit mode. --- SAV/SAV_Inventory.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/SAV/SAV_Inventory.cs b/SAV/SAV_Inventory.cs index 4bb7c2ea9..5c057c592 100644 --- a/SAV/SAV_Inventory.cs +++ b/SAV/SAV_Inventory.cs @@ -161,6 +161,7 @@ private void populateList(string[] itemarr, int offset, int itemcount) dataGridView1.Columns.Add(dgvIndex); dataGridView1.Rows.Add(itemcount); + dataGridView1.CancelEdit(); string itemname = ""; for (int i = 0; i < itemcount; i++)