mirror of
https://github.com/kwsch/NHSE.git
synced 2026-08-05 17:28:45 -05:00
Resolve Villager Import Bug (#403)
* Add missing not operator * Fix backwards conversions
This commit is contained in:
parent
0f79457d4c
commit
f4bbb7a7bb
|
|
@ -24,8 +24,8 @@ public static byte[] GetCompatible(byte[] data, int expect)
|
|||
|
||||
return expect switch
|
||||
{
|
||||
Villager1.SIZE when data.Length == Villager2.SIZE => Convert12(data),
|
||||
Villager2.SIZE when data.Length == Villager1.SIZE => Convert21(data),
|
||||
Villager1.SIZE when data.Length == Villager2.SIZE => Convert21(data),
|
||||
Villager2.SIZE when data.Length == Villager1.SIZE => Convert12(data),
|
||||
_ => data
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ private void B_LoadVillager_Click(object sender, EventArgs e)
|
|||
var path = ofd.FileName;
|
||||
var expectLength = SAV.Offsets.VillagerSize;
|
||||
var fi = new FileInfo(path);
|
||||
if (VillagerConverter.IsCompatible((int)fi.Length, expectLength))
|
||||
if (!VillagerConverter.IsCompatible((int)fi.Length, expectLength))
|
||||
{
|
||||
WinFormsUtil.Error(string.Format(MessageStrings.MsgDataSizeMismatchImport, fi.Length, expectLength), path);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user