mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-12 19:15:33 -05:00
Fix bool value naming for gen8 block editor
Was previously showing RaidArmor for pre-Armor saves, as the reference of a zero-length array was the same as the bools. Just sanity check since all block chunks have length.
This commit is contained in:
@@ -83,11 +83,14 @@ private string GetBlockHint(SCBlock z, int i)
|
||||
public string? GetBlockName(SCBlock block, out SaveBlock? saveBlock)
|
||||
{
|
||||
// See if we have a Block object for this block
|
||||
var obj = BlockList.FirstOrDefault(z => ReferenceEquals(z.Key.Data, block.Data));
|
||||
if (obj.Key != null)
|
||||
if (block.Data.Length != 0)
|
||||
{
|
||||
saveBlock = obj.Key;
|
||||
return obj.Value;
|
||||
var obj = BlockList.FirstOrDefault(z => ReferenceEquals(z.Key.Data, block.Data));
|
||||
if (obj.Key != null)
|
||||
{
|
||||
saveBlock = obj.Key;
|
||||
return obj.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// See if it's a single-value declaration
|
||||
|
||||
Reference in New Issue
Block a user